Maya 1.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MayaPlane Class Reference

A simple plane with lines for locating objects in the MayaWidget. More...

#include <maya.h>

Public Member Functions

 MayaPlane (const Box2 &=Box2(10.0), const double &=0.0, const double &=1.0)
 Create the plane. More...
 
 ~MayaPlane ()
 Destructor.
 
double Z () const
 Return the height.
 
Box2 GetArea () const
 Return the rectangular area.
 
void SetArea (const Box2 &)
 Define the rectangular area. More...
 
void Translate (const double &)
 Translate the plane. More...
 
bool Intersect (const Ray &, double &) const
 Intersect a ray with the plane. More...
 
void Render ()
 Render the horizontal plane.
 

Protected Member Functions

void InitRenderer ()
 Initialize the renderers.
 

Protected Attributes

Box2 area
 Area of the grid.
 
double height
 Elevation.
 
double line
 Line interval.
 
MayaSimpleRenderer * planeRendererWhiteLine
 Renderer used to draw the white line of the plane.
 
MayaSimpleRenderer * planeRendererBlackLine
 Renderer used to draw the black line of the plane.
 
MayaSimpleRenderer * planeRendererQuad
 Renderer used to draw the transparent quad of the plane.
 

Detailed Description

A simple plane with lines for locating objects in the MayaWidget.

Constructor & Destructor Documentation

◆ MayaPlane()

MayaPlane::MayaPlane ( const Box2 box = Box2(10.0),
const double &  z = 0.0,
const double &  l = 1.0 
)

Create the plane.

Parameters
boxRectangle.
zElevation.
lDistance between lines.

References area, height, line, planeRendererBlackLine, planeRendererQuad, and planeRendererWhiteLine.

Member Function Documentation

◆ Intersect()

bool MayaPlane::Intersect ( const Ray ray,
double &  t 
) const

Intersect a ray with the plane.

Parameters
rayThe ray.
tReturned intersection depth.

References area, height, and Plane::Intersect().

Referenced by MayaWidget::UpdateAnchor().

◆ SetArea()

void MayaPlane::SetArea ( const Box2 r)

Define the rectangular area.

Parameters
rRectangle area.

References area.

◆ Translate()

void MayaPlane::Translate ( const double &  t)

Translate the plane.

Parameters
tTranslation along z axis.

References height.