mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
obj-select -- object selection functionality
is-camera -- Adds a test for determining if object is a camera. cam-speed -- added method for getting the camera movement speed. zoned-in -- connection is flagged as "zoned-in" when client is fully connected and user can interact with it.
This commit is contained in:
parent
9106eef98b
commit
442b200ef6
7 changed files with 250 additions and 1 deletions
|
|
@ -20,6 +20,11 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
|
||||
// Copyright (C) 2015 Faust Logic, Inc.
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#ifndef _SCENEOBJECT_H_
|
||||
#define _SCENEOBJECT_H_
|
||||
|
||||
|
|
@ -778,6 +783,23 @@ class SceneObject : public NetObject, private SceneContainer::Link, public Proce
|
|||
// Note: This was placed in SceneObject to both ShapeBase and TSStatic could support it.
|
||||
public:
|
||||
GFXTextureObject* mAccuTex;
|
||||
// mSelectionFlags field keeps track of flags related to object selection.
|
||||
// PRE_SELECTED marks an object as pre-selected (object under cursor)
|
||||
// SELECTED marks an object as selected (a target)
|
||||
protected:
|
||||
U8 mSelectionFlags;
|
||||
public:
|
||||
enum {
|
||||
SELECTED = BIT(0),
|
||||
PRE_SELECTED = BIT(1),
|
||||
};
|
||||
virtual void setSelectionFlags(U8 flags) { mSelectionFlags = flags; }
|
||||
U8 getSelectionFlags() const { return mSelectionFlags; }
|
||||
bool needsSelectionHighlighting() const { return (mSelectionFlags != 0); }
|
||||
// This should only return true if the object represents an independent camera
|
||||
// as opposed to something like a Player that has a built-in camera that requires
|
||||
// special calculations to determine the view transform.
|
||||
virtual bool isCamera() const { return false; }
|
||||
};
|
||||
|
||||
#endif // _SCENEOBJECT_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue