LMinMax Class Reference

#include <c4d_tools.h>

详细描述

A class to construct a bounding box around points.

公共成员函数

  LMinMax ()
  LMinMax (const Vector64 &v)
void  Init (void)
void  Init (const Vector64 &v)
void  AddPoint (const Vector64 &p)
void  AddPoints (const Vector64 &a, const Vector64 &b)
void  Set (const Vector64 &a, const Vector64 &b)
Bool   IsPopulated (void) const
const Vector64 GetMin (void) const
const Vector64 GetMax (void) const
Vector64   GetMp (void) const
Vector64   GetRad (void) const
void  GetMpRad ( Vector64 *mp, Vector64 *rad) const

Private Attributes

Vector64   min
Vector64   max
Bool   used

构造函数 & 析构函数文档编制

◆  LMinMax() [1/2]

LMinMax ( )

Default constructor.

◆  LMinMax() [2/2]

LMinMax ( const Vector64 v )
explicit

Constructs with vector v set for both the minimum and maximum.

参数
[in] v The vector for minimum and maximum.

成员函数文档编制

◆  Init() [1/2]

void Init ( void  )

Resets the minimum and maximum to the largest values possible.

◆  Init() [2/2]

void Init ( const Vector64 v )

Initializes the minimum and maximum with vector v .

参数
[in] v The value to initialize minimum and maximum.

◆  AddPoint()

void AddPoint ( const Vector64 p )

Adds point p and recalculates the minimum and maximum.

参数
[in] p The point to add into the bounds.

◆  AddPoints()

void AddPoints ( const Vector64 a ,
const Vector64 b  
)

Adds points a and b and recalculates the minimum and maximum.

参数
[in] a The minimum point to add into the bounds.
[in] b The maximum point to add into the bounds.

◆  Set()

void Set ( const Vector64 a ,
const Vector64 b  
)

Sets the minimum and maximum of the bounding box.

参数
[in] a The minimum.
[in] b The maximum.

◆  IsPopulated()

Bool IsPopulated ( void  ) const

Checks if any points were added.

返回
true if if any points were added to the bounds, otherwise false .

◆  GetMin()

const Vector64 & GetMin ( void  ) const

Gets the minimum of the bounding box.

返回
The minimum position of the bounds.

◆  GetMax()

const Vector64 & GetMax ( void  ) const

Gets the maximum of the bounding box.

返回
The maximum position of the bounds.

◆  GetMp()

Vector64 GetMp ( void  ) const

Gets the middle between the minimum and maximum (the center).

返回
The center of the bounds.

◆  GetRad()

Vector64 GetRad ( void  ) const

Gets half the distance between the minimum and the maximum (the size).

返回
The size of the bounds.

◆  GetMpRad()

void GetMpRad ( Vector64 mp ,
Vector64 rad  
) const

Gets both the center and size of the bounding box.

参数
[out] mp Assigned the center of the bounds.
[out] rad Assigned the size of the bounds.

Member Data Documentation

◆  min

Vector64 min
private

◆  max

Vector64 max
private

◆  used

Bool used
private