* Moved PrimitiveBaseShape subclasses into factory methods - the subclassing scheme won't hold for serialization

* Extracted out the 'old' AddNewPrimitive that places an object at an exact pos, without the raytracing
This commit is contained in:
lbsa71
2007-12-28 08:34:38 +00:00
parent 5bd5770ed2
commit 8cd72beb86
8 changed files with 107 additions and 116 deletions

View File

@@ -43,7 +43,7 @@ namespace SimpleApp
public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection)
: base(
regionHandle, parent, ownerID, localID, new CylinderShape(0.5f, 0.2f), groupPosition, offsetPosition
regionHandle, parent, ownerID, localID, PrimitiveBaseShape.CreateCylinder(0.5f, 0.2f), groupPosition, offsetPosition
)
{
m_rotationDirection = rotationDirection;
@@ -64,7 +64,7 @@ namespace SimpleApp
public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos)
: base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default)
: base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default)
{
m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f);