public void SetCollisionShape(Basic3DShape shape) { CollisionShape = shape; if (Position != null) { shape.SetPosition(Position.get()); shape.SetScale(Scale.get()); shape.SetRotation(Rotation.get()); } }
public bool Intersects(Basic3DShape other) { Type t = other.GetType(); if (t.Equals(typeof(OrientedBoxShape))) { return(Intersects((OrientedBoxShape)other)); } if (t.Equals(typeof(Point3D))) { return(Intersects((Point3D)other)); } return(false); }