About Store Forum Documentation Contact



Post Reply 
Draw 3D image in Object Mode
Author Message
Harton Offline
Member

Post: #1
Draw 3D image in Object Mode
Hello!

My level designer asked me to objects in the scene which are represented by a small icon. For example, light is represented by a bulb.

I use class Image and function drawBlend. For example:
Code:
STRUCT(EditObjLightPoint , Edit::ObjClass)
//{
   // ...
   Image icon;

   // ...
   UInt drawPrepare();
   void drawBlend();
};

UInt EditObjLightPoint::drawPrepare()
{
   LightSqr(range, pos, color, volumetric).add(cast_shadows);

   return IndexToFlag(RM_BLEND);
}

void EditObjLightPoint::drawBlend()
{
   icon.draw3D(WHITE, 1.0f, 0.0f, this->pos);
}

I see icon in World Editor, in bookmark: Heightmap, Waypoint and Water, but I don't see it in bookmark: Object and Path.
What I do wrong?
06-07-2012 11:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Draw 3D image in Object Mode
hello,

please call SetMatrix() before icon.draw3D(..)

(I've added the following comment to that function for next SDK : "this relies on active object matrix which can be set using 'SetMatrix' function")
06-11-2012 03:24 PM
Find all posts by this user Quote this message in a reply
Harton Offline
Member

Post: #3
RE: Draw 3D image in Object Mode
Thanks! It works. smile
06-11-2012 06:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply