oi
class VisualObject : public Object {
protected:
Vector3D pos; // position of the object
Vector4D color; // color to modulate object
Transform3D transform; // original transform
// applied to objects // (before animators)
Добавляем эффекты
Transform3D curTransform; // current transform (build
// from original //by animators)
Array animators;
BoundingBox boundingBox; // bounding box of object
int saveFlags; // what state values to save
public:
VisualObject ( const char * theName, const Vector3D& thePos, const Vector4D& theColor, const Transform3D& theTr );
VisualObject ( const char * theName, const Vector3D& thePos, const Vector4D& theColor );
VisualObject ( const char * theName, const Vector3D& thePos );
const Vector3D& getPos () const {
return pos;
}
void setPos ( const Vector3D& thePos ) {
pos = thePos; buildBoundingBox ();
}
const Vector4D& getColor () const {.
return color;
}
void setColor ( const Vector4D& theColor ) {
color = theColor;
}
const Transform3D getTransform () const {
return transform;
}
void setTransform ( const Transform3DS theTr ) transform = theTr;
const BoundingBoxS getBoundingBox () const i return boundingBox;
void animate ( const Transform3DS tr ) curTransform = tr * curTransform;
void addAnimator ( Animator * theAnimator ) ,-bool removeAnimator ( const Strings name );
virtual void update ( Controller * controller,
float curTime );
virtual void draw ( Views view, const Cameras
camera, const Frustrums frustrum, Fog * fog );
virtual bool isTransparent () const {
return false;
}
static MetaClass classlnstance,-
protected:
virtual void buildBoundingBox ();
virtual void doDraw ( Views view, const Cameras
camera, const Frustrums frustrum, Fog * fog ) {}
virtual void preDraw ( Views view ); virtual void postDraw ( Views view );
⇐ Предыдущая| |Следующая ⇒