5 using SiliconStudio.Core.Mathematics;
6 using SiliconStudio.Core.Serialization.Converters;
7 using SiliconStudio.Paradox.Graphics;
18 if (InternalShape == null)
return;
19 InternalShape.Dispose();
46 var inverseRotation = LocalRotation;
47 inverseRotation.Invert();
49 PositiveCenterMatrix = Matrix.RotationQuaternion(LocalRotation) *
Matrix.
Translation(LocalOffset);
50 NegativeCenterMatrix = Matrix.RotationQuaternion(inverseRotation) *
Matrix.
Translation(-LocalOffset);
53 if (Parent == null)
return;
54 var childs = Parent.InternalCompoundShape.ChildList;
55 for (var i = 0; i < childs.Count; i++)
57 if (childs[i].ChildShape == InternalShape)
59 Parent.InternalCompoundShape.UpdateChildTransform(i, PositiveCenterMatrix,
true);
70 public Matrix PositiveCenterMatrix {
get;
private set; }
78 public Matrix NegativeCenterMatrix {
get;
private set; }
92 return InternalShape.LocalScaling;
96 DebugPrimitiveScaling *= Matrix.Scaling(value);
97 InternalShape.LocalScaling = value;
107 public bool Is2D {
get;
internal set; }
109 internal BulletSharp.CollisionShape InternalShape;
115 internal Matrix DebugPrimitiveScaling;
117 internal bool NeedsCustomCollisionCallback;
A geometric primitive. Use Cube, Cylinder, GeoSphere, Plane, Sphere, Teapot, Torus. See Draw+vertices to learn how to use it.
Represents a three dimensional mathematical vector.
static void Translation(ref Vector3 value, out Matrix result)
Creates a translation matrix using the specified offsets.
Vector3 LocalOffset
The local offset
void UpdateLocalTransformations()
Updates the local transformations, required if you change LocalOffset and/or LocalRotation.
Represents a four dimensional mathematical quaternion.
using SiliconStudio.Paradox. Physics
virtual void Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resourc...
Represents a 4x4 mathematical matrix.