GetClassName

This command can be used to identify the class of an unknown object.

Syntax

Returns

Returns the Object's class name.

Example

#include "Leadwerks.h"

using namespace Leadwerks;

Model* model = NULL;

int main(int argc, const char *argv[])
{
Leadwerks::Window* window = Leadwerks::Window::Create();
Context* context = Context::Create(window);
World* world = World::Create();
Camera* camera = Camera::Create();
DirectionalLight::Create()->SetRotation(35,45,0);

//Create a model
model = Model::Box();
model->SetPosition(0,0,3);

while (true)
{
if (window->Closed() || window->KeyDown(Key::Escape)) return false;

Leadwerks::Time::Update();
world->Update();
world->Render();

Draw::SetBlendMode(Blend::Alpha);
Draw::Text("Classname: "+model->GetClassName(),2,2);
Draw::SetBlendMode(Blend::Solid);

context->Sync();
}
return 0;
}