Exemple #1
0
        public CursorThing(Cursor3D cursor3d)
            : base("cursor", cursor3d.Chassis)
        {
            classification.physicality = Classification.Physicalities.NotApplicable;
            classification.Color       = Classification.Colors.NotApplicable;
            updateObj = new UpdateCursorObj(this, cursor3d);

            // Copy over references from real cursor.
            movement = cursor3d.Movement;
        }
Exemple #2
0
        }   // end of Node Render()

        public static void DrawSolidCone(Camera camera, Vector3 pos, Vector3 dir, float scale, Vector4 color)
        {
            Matrix localToWorld = Matrix.Identity;

            localToWorld.Up          = Vector3.UnitY;
            localToWorld.Backward    = -Vector3.Normalize(dir) * scale;
            localToWorld.Right       = Vector3.Normalize(Vector3.Cross(Vector3.UnitY, localToWorld.Backward)) * scale;
            localToWorld.Up          = Vector3.Normalize(Vector3.Cross(localToWorld.Backward, localToWorld.Right)) * scale;
            localToWorld.Translation = pos;

            Cursor3D.Render(camera, localToWorld, true, color);
        }
Exemple #3
0
 void Awake()
 {
     Instance = this;
 }
Exemple #4
0
 public UpdateCursorObj(GameThing parent, Cursor3D cursor3d)
 {
     this.parent   = parent;
     this.cursor3d = cursor3d;
 }