63
64
MT_Scalar m_radius;
66
bool m_ogldirty; // true if the openGL matrix for this object must be recomputed
70
inline void ClearModified()
75
inline void SetModified()
78
ActivateScheduleUpdateCallback();
80
inline void ClearDirty()
69
85
* Define the realtionship this node has with it's parent
70
86
* node. You should pass an unshared instance of an SG_ParentRelation
126
const MT_Matrix3x3& rot
131
const MT_Matrix3x3& rot
136
const MT_Vector3& scale
141
const MT_Vector3& scale
146
const MT_Vector3& scale
145
void SetLocalOrientation(const MT_Matrix3x3& rot)
147
m_localRotation = rot;
151
// rot is arrange like openGL matrix
152
void SetLocalOrientation(const float* rot)
154
m_localRotation.setValue(rot);
158
void SetWorldOrientation(const MT_Matrix3x3& rot)
160
m_worldRotation = rot;
163
void RelativeScale(const MT_Vector3& scale)
165
m_localScaling = m_localScaling * scale;
169
void SetLocalScale(const MT_Vector3& scale)
171
m_localScaling = scale;
175
void SetWorldScale(const MT_Vector3& scale)
177
m_worldScaling = scale;
180
const MT_Point3& GetLocalPosition() const
182
return m_localPosition;
185
const MT_Matrix3x3& GetLocalOrientation() const
187
return m_localRotation;
190
const MT_Vector3& GetLocalScale() const
192
return m_localScaling;
195
const MT_Point3& GetWorldPosition() const
197
return m_worldPosition;
200
const MT_Matrix3x3& GetWorldOrientation() const
202
return m_worldRotation;
205
const MT_Vector3& GetWorldScaling() const
207
return m_worldScaling;
210
void SetWorldFromLocalTransform()
212
m_worldPosition= m_localPosition;
213
m_worldScaling= m_localScaling;
214
m_worldRotation= m_localRotation;
179
219
MT_Transform GetWorldTransform() const;
181
bool ComputeWorldTransforms( const SG_Spatial *parent);
221
bool ComputeWorldTransforms(const SG_Spatial *parent, bool& parentUpdated)
223
return m_parent_relation->UpdateChildCoordinates(this,parent,parentUpdated);
184
228
* Bounding box functions.
187
void SetBBox(SG_BBox & bbox);
235
void SetBBox(SG_BBox& bbox)
188
241
bool inside(const MT_Point3 &point) const;
189
242
void getBBox(MT_Point3 *box) const;
190
243
void getAABBox(MT_Point3 *box) const;
192
245
MT_Scalar Radius() const { return m_radius; }
193
246
void SetRadius(MT_Scalar radius) { m_radius = radius; }
247
bool IsModified() { return m_modified; }
248
bool IsDirty() { return m_ogldirty; }
196
251
friend class SG_Controller;
252
friend class KX_BoneParentRelation;
253
friend class KX_VertexParentRelation;
254
friend class KX_SlowParentRelation;
255
friend class KX_NormalParentRelation;
199
258
* Protected constructor this class is not