Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
Leap::SceneObject Class Referenceabstract

#include <LeapScene.h>

Inheritance diagram for Leap::SceneObject:
Inheritance graph
[legend]

Public Types

enum  { kMaxContactPoints = 5 }
 

Public Member Functions

bool ApplyInteraction (const SceneInteraction &interaction)
 
void ClearHits ()
 
void ClearHitTime ()
 
void ClearInitialContact ()
 
void ClearNumContacts ()
 
void ClearNumPointing ()
 
template<class T >
T * GetAs ()
 
template<class T >
const T * GetAs () const
 
const VectorGetCenter () const
 
const SceneContactPointGetContactPoint (uint32_t uiIndex) const
 
const SceneContactPointGetContactPointByPointableID (int iPointableID) const
 
const SceneContactPointGetInitialContactPoint () const
 
const SceneContactPointGetLastContactPoint (uint32_t uiIndex) const
 
const SceneContactPointGetLastContactPointByPointableID (int iPointableID) const
 
uint32_t GetLastNumContacts () const
 
uint32_t GetNumContacts () const
 
uint32_t GetNumPointing () const
 
const Matrix GetRotation () const
 
float GetScale () const
 
SceneGetScene () const
 
const SceneObjectPtrGetSceneObjectPtr () const
 
uint32_t GetSerial () const
 a unique serial number assigned to each object at creation time. More...
 
float GetTotalHitTime () const
 
const MatrixGetTransform () const
 
virtual LEAP_EXPORT eSceneObjectType GetType () const =0
 pure virtual methods requiring implementation in inheriting classes. More...
 
void * GetUserData () const
 
Matrix GetWorldToObjectTransform () const
 returns a transform for converting world space coordinates and direction to object space. More...
 
bool HasInitialContact () const
 
void IncNumContacts (const SceneContactPoint &contactPoint)
 
void IncNumPointing ()
 
bool IsPendingRemoval () const
 
bool IsSelected () const
 
 operator const SceneObjectPtr & () const
 
void Rotate (const Vector &axis, float angleRadians)
 
void Rotate (const Matrix &rotationMatrix)
 
void Scale (float scaleMult)
 
 SceneObject ()
 
void SetCenter (const Vector &vCenter)
 
void SetRotation (const Vector &vAxis, float fAngleRadians)
 
void SetRotation (const Matrix &rotationMatrix)
 
void SetScale (float scale)
 
void SetSelected (bool selected)
 
void SetUserData (void *pUserData)
 
virtual LEAP_EXPORT bool TestRayHit (const SceneRay &testRay, float &fHitDistOut) const =0
 
virtual LEAP_EXPORT bool TestSphereHit (const Vector &vTestPoint, float fTestRadius) const =0
 
void Transform (const Matrix &mtxTransform)
 
void Translate (const Vector &translation)
 
Vector WorldToObjectPoint (const Vector &vPoint) const
 
virtual ~SceneObject ()
 

Static Public Member Functions

static eSceneObjectType NextObjectType ()
 
static eSceneObjectType ObjectType ()
 

Protected Member Functions

void rotateContactPoints ()
 

Protected Attributes

SceneContactPoint m_aContactPoints [kMaxContactPoints *2]
 
uint8_t m_bSelected
 
float m_fScale
 
float m_fTotalHitTime
 
SceneContactPoint m_initialContactPoint
 
Matrix m_mtxTransform
 
SceneContactPointm_paContactPoints
 
SceneContactPointm_paLastContactPoints
 
void * m_pUserData
 
uint8_t m_uiHasInitialContact
 
uint8_t m_uiLastNumContacts
 
uint8_t m_uiNumContacts
 
uint8_t m_uiNumPointing
 

Private Attributes

uint8_t m_bPendingRemoval
 
uint16_t m_index
 
Scenem_pScene
 
uint32_t m_serial
 

Friends

class Scene
 

Detailed Description

abstract base class of objects managed by a Scene. The only interface used by Scene, it has no knowledge of concrete implementations.

Definition at line 425 of file LeapScene.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMaxContactPoints 

Definition at line 438 of file LeapScene.h.

Constructor & Destructor Documentation

◆ SceneObject()

Leap::SceneObject::SceneObject ( )
inline

Definition at line 441 of file LeapScene.h.

◆ ~SceneObject()

virtual Leap::SceneObject::~SceneObject ( )
inlinevirtual

Definition at line 456 of file LeapScene.h.

Member Function Documentation

◆ ApplyInteraction()

bool Leap::SceneObject::ApplyInteraction ( const SceneInteraction interaction)
inline

Definition at line 526 of file LeapScene.h.

◆ ClearHits()

void Leap::SceneObject::ClearHits ( )
inline

Definition at line 615 of file LeapScene.h.

◆ ClearHitTime()

void Leap::SceneObject::ClearHitTime ( )
inline

Definition at line 601 of file LeapScene.h.

◆ ClearInitialContact()

void Leap::SceneObject::ClearInitialContact ( )
inline

Definition at line 603 of file LeapScene.h.

◆ ClearNumContacts()

void Leap::SceneObject::ClearNumContacts ( )
inline

Definition at line 597 of file LeapScene.h.

◆ ClearNumPointing()

void Leap::SceneObject::ClearNumPointing ( )
inline

Definition at line 599 of file LeapScene.h.

◆ GetAs() [1/2]

template<class T >
T* Leap::SceneObject::GetAs ( )
inline

Definition at line 471 of file LeapScene.h.

◆ GetAs() [2/2]

template<class T >
const T* Leap::SceneObject::GetAs ( ) const
inline

Definition at line 484 of file LeapScene.h.

◆ GetCenter()

const Vector& Leap::SceneObject::GetCenter ( ) const
inline

Definition at line 570 of file LeapScene.h.

◆ GetContactPoint()

const SceneContactPoint* Leap::SceneObject::GetContactPoint ( uint32_t  uiIndex) const
inline

Definition at line 626 of file LeapScene.h.

◆ GetContactPointByPointableID()

const SceneContactPoint* Leap::SceneObject::GetContactPointByPointableID ( int  iPointableID) const
inline

Definition at line 641 of file LeapScene.h.

◆ GetInitialContactPoint()

const SceneContactPoint* Leap::SceneObject::GetInitialContactPoint ( ) const
inline

Definition at line 636 of file LeapScene.h.

◆ GetLastContactPoint()

const SceneContactPoint* Leap::SceneObject::GetLastContactPoint ( uint32_t  uiIndex) const
inline

Definition at line 631 of file LeapScene.h.

◆ GetLastContactPointByPointableID()

const SceneContactPoint* Leap::SceneObject::GetLastContactPointByPointableID ( int  iPointableID) const
inline

Definition at line 654 of file LeapScene.h.

◆ GetLastNumContacts()

uint32_t Leap::SceneObject::GetLastNumContacts ( ) const
inline

Definition at line 593 of file LeapScene.h.

◆ GetNumContacts()

uint32_t Leap::SceneObject::GetNumContacts ( ) const
inline

Definition at line 589 of file LeapScene.h.

◆ GetNumPointing()

uint32_t Leap::SceneObject::GetNumPointing ( ) const
inline

Definition at line 591 of file LeapScene.h.

◆ GetRotation()

const Matrix Leap::SceneObject::GetRotation ( ) const
inline

Definition at line 572 of file LeapScene.h.

◆ GetScale()

float Leap::SceneObject::GetScale ( ) const
inline

Definition at line 576 of file LeapScene.h.

◆ GetScene()

Scene* Leap::SceneObject::GetScene ( ) const
inline

Definition at line 502 of file LeapScene.h.

◆ GetSceneObjectPtr()

const SceneObjectPtr& Leap::SceneObject::GetSceneObjectPtr ( ) const
inline

Definition at line 489 of file LeapScene.h.

◆ GetSerial()

uint32_t Leap::SceneObject::GetSerial ( ) const
inline

a unique serial number assigned to each object at creation time.

Definition at line 500 of file LeapScene.h.

◆ GetTotalHitTime()

float Leap::SceneObject::GetTotalHitTime ( ) const
inline

Definition at line 624 of file LeapScene.h.

◆ GetTransform()

const Matrix& Leap::SceneObject::GetTransform ( ) const
inline

Definition at line 574 of file LeapScene.h.

◆ GetType()

virtual LEAP_EXPORT eSceneObjectType Leap::SceneObject::GetType ( ) const
pure virtual

pure virtual methods requiring implementation in inheriting classes.

Implemented in Leap::SceneSphere, Leap::ScenePlane, Leap::SceneDisk, Leap::SceneCylinder, and Leap::SceneBox.

◆ GetUserData()

void* Leap::SceneObject::GetUserData ( ) const
inline

Definition at line 667 of file LeapScene.h.

◆ GetWorldToObjectTransform()

Matrix Leap::SceneObject::GetWorldToObjectTransform ( ) const
inline

returns a transform for converting world space coordinates and direction to object space.

Definition at line 674 of file LeapScene.h.

◆ HasInitialContact()

bool Leap::SceneObject::HasInitialContact ( ) const
inline

Definition at line 595 of file LeapScene.h.

◆ IncNumContacts()

void Leap::SceneObject::IncNumContacts ( const SceneContactPoint contactPoint)
inline

Definition at line 607 of file LeapScene.h.

◆ IncNumPointing()

void Leap::SceneObject::IncNumPointing ( )
inline

Definition at line 605 of file LeapScene.h.

◆ IsPendingRemoval()

bool Leap::SceneObject::IsPendingRemoval ( ) const
inline

Definition at line 671 of file LeapScene.h.

◆ IsSelected()

bool Leap::SceneObject::IsSelected ( ) const
inline

Definition at line 578 of file LeapScene.h.

◆ NextObjectType()

static eSceneObjectType Leap::SceneObject::NextObjectType ( )
inlinestatic

Definition at line 432 of file LeapScene.h.

◆ ObjectType()

static eSceneObjectType Leap::SceneObject::ObjectType ( )
inlinestatic

Definition at line 430 of file LeapScene.h.

◆ operator const SceneObjectPtr &()

Leap::SceneObject::operator const SceneObjectPtr & ( ) const
inline

Definition at line 494 of file LeapScene.h.

◆ Rotate() [1/2]

void Leap::SceneObject::Rotate ( const Vector axis,
float  angleRadians 
)
inline

Definition at line 506 of file LeapScene.h.

◆ Rotate() [2/2]

void Leap::SceneObject::Rotate ( const Matrix rotationMatrix)
inline

Definition at line 511 of file LeapScene.h.

◆ rotateContactPoints()

void Leap::SceneObject::rotateContactPoints ( )
inlineprotected

Definition at line 682 of file LeapScene.h.

◆ Scale()

void Leap::SceneObject::Scale ( float  scaleMult)
inline

Definition at line 516 of file LeapScene.h.

◆ SetCenter()

void Leap::SceneObject::SetCenter ( const Vector vCenter)
inline

Definition at line 556 of file LeapScene.h.

◆ SetRotation() [1/2]

void Leap::SceneObject::SetRotation ( const Vector vAxis,
float  fAngleRadians 
)
inline

Definition at line 558 of file LeapScene.h.

◆ SetRotation() [2/2]

void Leap::SceneObject::SetRotation ( const Matrix rotationMatrix)
inline

Definition at line 563 of file LeapScene.h.

◆ SetScale()

void Leap::SceneObject::SetScale ( float  scale)
inline

Definition at line 568 of file LeapScene.h.

◆ SetSelected()

void Leap::SceneObject::SetSelected ( bool  selected)
inline

Definition at line 580 of file LeapScene.h.

◆ SetUserData()

void Leap::SceneObject::SetUserData ( void *  pUserData)
inline

Definition at line 669 of file LeapScene.h.

◆ TestRayHit()

virtual LEAP_EXPORT bool Leap::SceneObject::TestRayHit ( const SceneRay testRay,
float &  fHitDistOut 
) const
pure virtual

◆ TestSphereHit()

virtual LEAP_EXPORT bool Leap::SceneObject::TestSphereHit ( const Vector vTestPoint,
float  fTestRadius 
) const
pure virtual

◆ Transform()

void Leap::SceneObject::Transform ( const Matrix mtxTransform)
inline

Definition at line 521 of file LeapScene.h.

◆ Translate()

void Leap::SceneObject::Translate ( const Vector translation)
inline

Definition at line 504 of file LeapScene.h.

◆ WorldToObjectPoint()

Vector Leap::SceneObject::WorldToObjectPoint ( const Vector vPoint) const
inline

Definition at line 676 of file LeapScene.h.

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

Definition at line 427 of file LeapScene.h.

Member Data Documentation

◆ m_aContactPoints

SceneContactPoint Leap::SceneObject::m_aContactPoints[kMaxContactPoints *2]
protected

Definition at line 695 of file LeapScene.h.

◆ m_bPendingRemoval

uint8_t Leap::SceneObject::m_bPendingRemoval
private

Definition at line 710 of file LeapScene.h.

◆ m_bSelected

uint8_t Leap::SceneObject::m_bSelected
protected

Definition at line 707 of file LeapScene.h.

◆ m_fScale

float Leap::SceneObject::m_fScale
protected

Definition at line 700 of file LeapScene.h.

◆ m_fTotalHitTime

float Leap::SceneObject::m_fTotalHitTime
protected

Definition at line 699 of file LeapScene.h.

◆ m_index

uint16_t Leap::SceneObject::m_index
private

Definition at line 711 of file LeapScene.h.

◆ m_initialContactPoint

SceneContactPoint Leap::SceneObject::m_initialContactPoint
protected

Definition at line 694 of file LeapScene.h.

◆ m_mtxTransform

Matrix Leap::SceneObject::m_mtxTransform
protected

Definition at line 693 of file LeapScene.h.

◆ m_paContactPoints

SceneContactPoint* Leap::SceneObject::m_paContactPoints
protected

Definition at line 697 of file LeapScene.h.

◆ m_paLastContactPoints

SceneContactPoint* Leap::SceneObject::m_paLastContactPoints
protected

Definition at line 698 of file LeapScene.h.

◆ m_pScene

Scene* Leap::SceneObject::m_pScene
private

Definition at line 713 of file LeapScene.h.

◆ m_pUserData

void* Leap::SceneObject::m_pUserData
protected

Definition at line 696 of file LeapScene.h.

◆ m_serial

uint32_t Leap::SceneObject::m_serial
private

Definition at line 712 of file LeapScene.h.

◆ m_uiHasInitialContact

uint8_t Leap::SceneObject::m_uiHasInitialContact
protected

Definition at line 705 of file LeapScene.h.

◆ m_uiLastNumContacts

uint8_t Leap::SceneObject::m_uiLastNumContacts
protected

Definition at line 704 of file LeapScene.h.

◆ m_uiNumContacts

uint8_t Leap::SceneObject::m_uiNumContacts
protected

Definition at line 703 of file LeapScene.h.

◆ m_uiNumPointing

uint8_t Leap::SceneObject::m_uiNumPointing
protected

Definition at line 702 of file LeapScene.h.


The documentation for this class was generated from the following file:


leap_motion
Author(s): Florian Lier , Mirza Shah , Isaac IY Saito
autogenerated on Mon Feb 28 2022 22:41:08