geomUtils.Obb Class

Module: cc Parent Module: cc

obb

Index

Properties
Methods
  • create create a new obb
  • clone clone a new obb
  • copy copy the values from one obb to another
  • fromPoints create a new obb from two corner points
  • set Set the components of a obb to the given values
  • getBoundary Get the bounding points of this shape
  • transform Transform this shape
  • translateAndRotate Transform out based on this obb data.
  • setScale Scale out based on this obb data.

Details

Properties

type
meta description
Type number
Defined in cocos2d/core/geom-utils/obb.ts:53
center

The center of the local coordinate.

meta description
Type Vec3
Defined in cocos2d/core/geom-utils/obb.ts:185
halfExtents

Half the length, width, and height.

meta description
Type Vec3
Defined in cocos2d/core/geom-utils/obb.ts:194
orientation

Direction matrix.

meta description
Type Mat3
Defined in cocos2d/core/geom-utils/obb.ts:203

Methods

create

create a new obb

meta description
Returns Obb
Defined in cocos2d/core/geom-utils/obb.ts:63
Parameters
  • cx Number X coordinates of the shape relative to the origin.
  • cy Number Y coordinates of the shape relative to the origin.
  • cz Number Z coordinates of the shape relative to the origin.
  • hw Number Obb is half the width.
  • hh Number Obb is half the height.
  • hl Number Obb is half the Length.
  • ox_1 Number Direction matrix parameter.
  • ox_2 Number Direction matrix parameter.
  • ox_3 Number Direction matrix parameter.
  • oy_1 Number Direction matrix parameter.
  • oy_2 Number Direction matrix parameter.
  • oy_3 Number Direction matrix parameter.
  • oz_1 Number Direction matrix parameter.
  • oz_2 Number Direction matrix parameter.
  • oz_3 Number Direction matrix parameter.
clone

clone a new obb

meta description
Returns Obb
Defined in cocos2d/core/geom-utils/obb.ts:95
Parameters
  • a Obb The target of cloning.
copy

copy the values from one obb to another

meta description
Returns Obb
Defined in cocos2d/core/geom-utils/obb.ts:113
Parameters
  • out Obb Obb that accepts the operation.
  • a Obb Obb being copied.
fromPoints

create a new obb from two corner points

meta description
Returns Obb
Defined in cocos2d/core/geom-utils/obb.ts:131
Parameters
  • out Obb Obb that accepts the operation.
  • minPos Vec3 The smallest point of obb.
  • maxPos Vec3 Obb's maximum point.
set

Set the components of a obb to the given values

meta description
Returns Obb
Defined in cocos2d/core/geom-utils/obb.ts:149
Parameters
  • cx Number X coordinates of the shape relative to the origin.
  • cy Number Y coordinates of the shape relative to the origin.
  • cz Number Z coordinates of the shape relative to the origin.
  • hw Number Obb is half the width.
  • hh Number Obb is half the height.
  • hl Number Obb is half the Length.
  • ox_1 Number Direction matrix parameter.
  • ox_2 Number Direction matrix parameter.
  • ox_3 Number Direction matrix parameter.
  • oy_1 Number Direction matrix parameter.
  • oy_2 Number Direction matrix parameter.
  • oy_3 Number Direction matrix parameter.
  • oz_1 Number Direction matrix parameter.
  • oz_2 Number Direction matrix parameter.
  • oz_3 Number Direction matrix parameter.
getBoundary

Get the bounding points of this shape

meta description
Defined in cocos2d/core/geom-utils/obb.ts:225
Parameters
transform

Transform this shape

meta description
Defined in cocos2d/core/geom-utils/obb.ts:240
Parameters
  • m Mat4 The transformation matrix.
  • pos Vec3 The position part of the transformation.
  • rot Quat The rotating part of the transformation.
  • scale Vec3 The scaling part of the transformation.
  • out Obb Target of transformation.
translateAndRotate

Transform out based on this obb data.

meta description
Defined in cocos2d/core/geom-utils/obb.ts:258
Parameters
  • m Mat4 The transformation matrix.
  • rot Quat The rotating part of the transformation.
  • out Obb Target of transformation.
setScale

Scale out based on this obb data.

meta description
Defined in cocos2d/core/geom-utils/obb.ts:274
Parameters
  • scale Vec3 Scale value.
  • out Obb Scaled target.

results matching ""

    No results matching ""