Plane Class Reference

#include <manipulator.h>

Class Description

See also
Class FPMixinInterface, Class Point3, Class Ray , Class IManipulatorMgr

Description:
The manipulator system exports a helper plane class. This is very useful when writing OnMouseMove() methods. It is normally used to intersect a view ray with some plane that is used by the manipulator.
Data Members:
static Plane msXYPlane;

This constant defines the XY plane.

static Plane msXZPlane;

This constant defines the XZ plane.

static Plane msYZPlane;

This constant defines the YZ plane.
+ Inheritance diagram for Plane:

Public Types

enum  {
  intersect, mostOrthogonal, getNormal, getPoint,
  getPlaneConstant
}
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

ManipExport Plane (Point3 &normal, Point3 &point)
 
ManipExport Plane (Point3 &p1, Point3 &p2, Point3 &p3)
 
ManipExport Plane ()
 
ManipExport bool Intersect (Ray &ray, Point3 &intersectionPoint)
 
ManipExport Point3GetNormal ()
 
ManipExport Point3GetPoint ()
 
ManipExport float GetPlaneConstant ()
 
ManipExport PlaneMostOrthogonal (Ray &viewDir, Plane &plane)
 
 FN_2 (intersect, TYPE_BOOL, Intersect, TYPE_RAY_BV, TYPE_POINT3_BR)
 
 FN_2 (mostOrthogonal, TYPE_INTERFACE, FPMostOrthogonal, TYPE_RAY_BV, TYPE_INTERFACE)
 
 RO_PROP_FN (getNormal, GetNormal, TYPE_POINT3_BV)
 
 RO_PROP_FN (getPoint, GetPoint, TYPE_POINT3_BV)
 
 RO_PROP_FN (getPlaneConstant, GetPlaneConstant, TYPE_FLOAT)
 
ManipExport PlaneFPMostOrthogonal (Ray &viewRay, FPInterface *plane)
 
ManipExport FPInterfaceDescGetDesc ()
 
ManipExport LifetimeType LifetimeControl ()
 
ManipExport BaseInterfaceAcquireInterface ()
 
ManipExport void ReleaseInterface ()
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Static Public Attributes

static ManipExport Plane msXYPlane
 
static ManipExport Plane msXZPlane
 
static ManipExport Plane msYZPlane
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Member Enumeration Documentation

anonymous enum
Enumerator
intersect 
mostOrthogonal 
getNormal 
getPoint 
getPlaneConstant 
Definition: manipulator.h:97
Definition: manipulator.h:97
Definition: manipulator.h:97
Definition: manipulator.h:97
Definition: manipulator.h:97

Constructor & Destructor Documentation

ManipExport Plane ( Point3 normal,
Point3 point 
)
Remarks
Constructor.

Create a plane that passes through the given point with the given normal.
Parameters:
Point3& normal

The normal of the plane.

Point3& point

The point the plane should pass through.
ManipExport Plane ( Point3 p1,
Point3 p2,
Point3 p3 
)
Remarks
Constructor.

Create a plane that passes through all three given points.
Parameters:
Points3& p1, Points3& p2, Points3& p3

The three points the plane should pass through.

ManipExport Plane ( )
inline
Remarks
Constructor.
64 : mNormal(0,0,1), mPoint(0,0,0), mD(0.0f) {}

Member Function Documentation

ManipExport bool Intersect ( Ray ray,
Point3 intersectionPoint 
)
Remarks
This method will intersect the plane with a ray.
Parameters:
Ray& ray

The ray you wish to test for intersection.

Points3& intersectionPoint

The resulting intersection point, if the ray intersected the plane.
Returns
TRUE if the ray intersects, otherwise FALSE.
ManipExport Point3& GetNormal ( )
inline
Remarks
This method returns the normal of the plane.
75 { return mNormal; }
ManipExport Point3& GetPoint ( )
inline
Remarks
This method returns the point that the plane passes through.
78 { return mPoint; }
ManipExport float GetPlaneConstant ( )
inline
Remarks
This method returns the plane equation constant.
80 { return mD; }
ManipExport Plane& MostOrthogonal ( Ray viewDir,
Plane plane 
)
Remarks
This method can be used to test which plane (either this or plane) is most orthogonal with the given view ray, returning that plane. This can be useful in determining which plane to project a view ray onto, if more than one is applicable.
Parameters:
Ray& viewDir

The given view ray.

Plane& plane

The plane to test.
FN_2 ( intersect  ,
TYPE_BOOL  ,
Intersect  ,
TYPE_RAY_BV  ,
TYPE_POINT3_BR   
)
RO_PROP_FN ( getNormal  ,
GetNormal  ,
TYPE_POINT3_BV   
)
RO_PROP_FN ( getPoint  ,
GetPoint  ,
TYPE_POINT3_BV   
)
RO_PROP_FN ( getPlaneConstant  ,
GetPlaneConstant  ,
TYPE_FLOAT   
)
ManipExport Plane* FPMostOrthogonal ( Ray viewRay,
FPInterface plane 
)
ManipExport FPInterfaceDesc* GetDesc ( )
virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

ManipExport LifetimeType LifetimeControl ( )
inlinevirtual
Remarks
This method allows inquiries into the actual lifetime policy of a client and provide a server-controlled delete notify callback.
Returns
One of the following LifetimeTypes:

noRelease

Do not call release, use interface as long as you like.

immediateRelease

The interface is only good for one calls. The release is implied so a call to release is not required.

wantsRelease

The clients are controlling the lifetime, so the interface needs a Release() when the client has finished. This is the default.

serverControlled

The server controls the lifetime and will use the InterfaceNotifyCallback to inform the code when it is gone.
Default Implementation:
{ return noRelease; }

Reimplemented from FPMixinInterface.

113 { return wantsRelease; }
Definition: baseinterface.h:94
ManipExport BaseInterface* AcquireInterface ( )
inlinevirtual
Remarks
This method is part of the interface reference management and can be implemented by dynamically allocated interfaces for ref-count based lifetime control). This method should return TRUE if it needs Release() to be called.
Default Implementation:
{ return false; }

Reimplemented from BaseInterface.

114 { return this; }
ManipExport void ReleaseInterface ( )
virtual
Remarks
This method is called when a reference to this object is deleted.
Default Implementation:
{ }

Reimplemented from BaseInterface.

Member Data Documentation

ManipExport Plane msXYPlane
static
ManipExport Plane msXZPlane
static
ManipExport Plane msYZPlane
static