Rhino C++ API  8.14
Public Member Functions | Public Attributes | List of all members
ON_Box Class Reference

#include <opennurbs_box.h>

Public Member Functions

 ON_Box ()
 
 ON_Box (const ON_BoundingBox &bbox)
 
 ~ON_Box ()
 
double Area () const
 
ON_BoundingBox BoundingBox () const
 
ON_3dPoint Center () const
 
bool ClosestPointTo (ON_3dPoint point, double *r, double *s, double *t) const
 
ON_3dPoint ClosestPointTo (ON_3dPoint test_point) const
 returns point on box that is closest to given point More...
 
bool Create (const ON_BoundingBox &bbox)
 
void Destroy ()
 
bool GetCorners (ON_3dPoint *corners) const
 
bool GetCorners (ON_SimpleArray< ON_3dPoint > &corners) const
 
int IsDegenerate (double tolerance=ON_UNSET_VALUE) const
 
bool IsValid () const
 
ON_3dPoint PointAt (double r, double s, double t) const
 
bool Rotate (double angle_radians, const ON_3dVector &axis_of_rotation)
 
bool Rotate (double angle_radians, const ON_3dVector &axis_of_rotation, const ON_3dPoint &center_of_rotation)
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation)
 rotate sphere about its origin More...
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation, const ON_3dPoint &center_of_rotation)
 rotate sphere about a point and axis More...
 
bool Transform (const ON_Xform &)
 
bool Translate (const ON_3dVector &)
 
double Volume () const
 

Public Attributes

ON_Interval dx
 intervals are finite and increasing when the box is valid More...
 
ON_Interval dy
 
ON_Interval dz
 
ON_Plane plane
 

Detailed Description

Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete openNURBS copyright information see http://www.opennurbs.org.

Constructor & Destructor Documentation

◆ ON_Box() [1/2]

ON_Box::ON_Box ( )

◆ ON_Box() [2/2]

ON_Box::ON_Box ( const ON_BoundingBox bbox)

◆ ~ON_Box()

ON_Box::~ON_Box ( )

Member Function Documentation

◆ Area()

double ON_Box::Area ( ) const

◆ BoundingBox()

ON_BoundingBox ON_Box::BoundingBox ( ) const

◆ Center()

ON_3dPoint ON_Box::Center ( ) const

◆ ClosestPointTo() [1/2]

bool ON_Box::ClosestPointTo ( ON_3dPoint  point,
double *  r,
double *  s,
double *  t 
) const

◆ ClosestPointTo() [2/2]

ON_3dPoint ON_Box::ClosestPointTo ( ON_3dPoint  test_point) const

returns point on box that is closest to given point

◆ Create()

bool ON_Box::Create ( const ON_BoundingBox bbox)

◆ Destroy()

void ON_Box::Destroy ( )

◆ GetCorners() [1/2]

bool ON_Box::GetCorners ( ON_3dPoint corners) const

◆ GetCorners() [2/2]

bool ON_Box::GetCorners ( ON_SimpleArray< ON_3dPoint > &  corners) const

◆ IsDegenerate()

int ON_Box::IsDegenerate ( double  tolerance = ON_UNSET_VALUE) const

Description: Test the box to see if it is degenerate (flat) in one or more directions. Parameters: tolerance - [in] Distances <= tolerance will be considered to be zero. If tolerance is negative (default), then a scale invariant tolerance is used. Returns: @untitled table 0 box is not degenerate 1 box is a rectangle (degenerate in one direction) 2 box is a line (degenerate in two directions) 3 box is a point (degenerate in three directions) 4 box is not valid

◆ IsValid()

bool ON_Box::IsValid ( ) const

◆ PointAt()

ON_3dPoint ON_Box::PointAt ( double  r,
double  s,
double  t 
) const

◆ Rotate() [1/4]

bool ON_Box::Rotate ( double  angle_radians,
const ON_3dVector axis_of_rotation 
)
Parameters
angle_radiansangle in radians
axis_of_rotationaxis of rotation

◆ Rotate() [2/4]

bool ON_Box::Rotate ( double  angle_radians,
const ON_3dVector axis_of_rotation,
const ON_3dPoint center_of_rotation 
)
Parameters
angle_radiansangle in radians
axis_of_rotationaxis of rotation
center_of_rotationcenter of rotation

◆ Rotate() [3/4]

bool ON_Box::Rotate ( double  sin_angle,
double  cos_angle,
const ON_3dVector axis_of_rotation 
)

rotate sphere about its origin

Parameters
sin_anglesin(angle)
cos_anglecos(angle)
axis_of_rotationaxis of rotation

◆ Rotate() [4/4]

bool ON_Box::Rotate ( double  sin_angle,
double  cos_angle,
const ON_3dVector axis_of_rotation,
const ON_3dPoint center_of_rotation 
)

rotate sphere about a point and axis

Parameters
sin_anglesin(angle)
cos_anglecos(angle)
axis_of_rotationaxis of rotation
center_of_rotationcenter of rotation

◆ Transform()

bool ON_Box::Transform ( const ON_Xform )

◆ Translate()

bool ON_Box::Translate ( const ON_3dVector )

◆ Volume()

double ON_Box::Volume ( ) const

Member Data Documentation

◆ dx

ON_Interval ON_Box::dx

intervals are finite and increasing when the box is valid

◆ dy

ON_Interval ON_Box::dy

◆ dz

ON_Interval ON_Box::dz

◆ plane

ON_Plane ON_Box::plane