- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# MPlane Class Reference

# OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

A plane equation.

This class describes a mathematical plane.

`#include <MPlane.h>`

List of all members.

## Public Member Functions
| MPlane ()
| Class default constructor.
| MPlane (const MPlane &)
| Class copy constructor.
MVector | normal () const
| Returns the normal of the plane.
double | distance () const
| Returns the distance of the plane along the normal.
void | setPlane (double a, double b, double c, double d)
| Directly set the equation of the plane in the form: ax + by +cz + d = 0.
void | setPlane (const MVector &n, double d)
| Set the equation of the plane from a normal and offset.
double | distance (const MVector &) const
| Returns the unsigned distance from the plane to the specified point.
double | directedDistance (const MVector &) const
| Returns the signed distance from the plane to the specified point.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.

## Constructor & Destructor Documentation

MPlane | ( |  | ) |

Class default constructor.

Create a new default plane.

MPlane | ( | const MPlane & | src | ) |

Class copy constructor.

Create a new vector and initialize it to the same values as the given plane.

Parameters:

  [in] | src | the plane to copy

## Member Function Documentation

MVector normal | ( |  | ) | const

Search for all occurrences

Returns the normal of the plane.

Returns:
  The plane's normal

double distance | ( |  | ) | const

Search for all occurrences

Returns the distance of the plane along the normal.

Returns:
  The distance of the plane along the normal

void setPlane | ( | double | a,
|  | double | b,
|  | double | c,
|  | double | d
| ) |  |

Search for all occurrences

Directly set the equation of the plane in the form: ax + by +cz + d = 0.

Parameters:

  [in] | a | The plane equation's x coefficent
  [in] | b | The plane equation's y coefficent
  [in] | c | The plane equation's z coefficent
  [in] | d | The plane equation's constant distance term

void setPlane | ( | const MVector & | n,
|  | double | d
| ) |  |

Search for all occurrences

Set the equation of the plane from a normal and offset.

Parameters:

  [in] | n | The plane's normal
  [in] | d | The offset of the plane along the normal

double distance | ( | const MVector & | point | ) | const

Search for all occurrences

Returns the unsigned distance from the plane to the specified point.

Parameters:

  [in] | point | The point from which to calculate the distance

Returns:
  The distance from the specified point to the plane.

double directedDistance | ( | const MVector & | point | ) | const

Search for all occurrences

Returns the signed distance from the plane to the specified point.

Parameters:

  [in] | point | The point from which to calculate the distance

Returns:
  The distance from the specified point to the plane.

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MPlane MPlane MPlane MPlane MPlane MPlane MPlane MPlane MPlane MPlane
MPlane MPlane MPlane MPlane MPlane MPlane MPlane MPlane MPlane MPlane