Click or drag to resize

Cuboid Class

This class defines a cuboid by its bottom, left, front corner and its sizes in x, y and z direction. The directions are defined in this way, i. e. the origin is the bottom, left, front corner:
  ^
z |
  |  / y
  | /
  |/
  +---------->
 O          x
Inheritance Hierarchy
SystemObject
  RAYLASE.Marker.VectorGraphicElementCuboid

Namespace: RAYLASE.Marker.VectorGraphicElement
Assembly: RAYLASE.Marker.VectorGraphicElement (in RAYLASE.Marker.VectorGraphicElement.dll) Version: 2.19.0
Syntax
C#
public class Cuboid

The Cuboid type exposes the following members.

Constructors
 NameDescription
Public methodCuboid Creates a cuboid.
Public methodCuboid(Cuboid) Copy constructor.
Public methodCuboid(dvec3, dvec3) Creates a cuboid based on its center and size.
Public methodCuboid(Double, Double, Double, Double, Double, Double) Creates a cuboid.
Top
Properties
 NameDescription
Public propertyCenter Gets the center of the bounding box.
Public propertyCenterX Gets the x-center of the bounding box.
Public propertyCenterY Gets the y-center of the bounding box.
Public propertyCenterZ Gets the y-center of the bounding box.
Public propertyItem 
Public propertyMaxMaxMax Returns the cuboid's top, right, back corner.
Public propertyMaxMaxMin Returns the cuboid's bottom, right, back corner.
Public propertyMaxMinMax Returns the cuboid's top, right, front corner.
Public propertyMaxMinMin Returns the cuboid's bottom, right, front corner.
Public propertyMinMaxMax Returns the cuboid's top, left, back corner.
Public propertyMinMaxMin Returns the cuboid's bottom, left, back corner.
Public propertyMinMinMax Returns the cuboid's top, left, front corner.
Public propertyMinMinMin Returns the cuboid's bottom, left, front corner.
Public propertyOrigin Gets or sets the bottom, left, front corner of the cuboid.
Public propertySize Gets or sets the cuboid's sizes.
Public propertySizeX Sets and gets the cuboid's size in x direction.
Public propertySizeY Sets and gets the cuboid's size in y direction.
Public propertySizeZ Sets and gets the cuboid's size in z direction.
Public propertyVolume Gets the cuboid's volume.
Public propertyX Sets and gets the x coordinate of the cuboid's bottom, left, front corner.
Public propertyXYArea Gets the area of the x and y dimension.
Public propertyY Sets and gets the y coordinate of the cuboid's bottom, left, front corner.
Public propertyZ Sets and gets the z coordinate of the cuboid's bottom, left, front corner.
Top
Methods
 NameDescription
Public methodContains(Cuboid) Returns true if the supplied cuboid is inside this cuboid.
Public methodContains(dvec3) Returns true if the point is inside the cuboid.
Public methodCopyFrom Copies all properties from the source.
Public methodGet000InPercent Returns the position of the coordinate (0,0,0) in percent of the cuboids edges' lenghts. Example: X = -2, SizeX = 10, Y = -3, SizeY = 6, Z = -4, SizeZ = 16 returns (20, 50, 25)
Public methodHasAnyDimension Checks if the cube has any x, y or z dimension. But in case any of the sizes is negative, the cuboid is considered to have no dimension.
Public methodHasVolumeOrArea Checks if at least two sizes are greater than 0.
Public methodIntersectWith Returns the intersection of this and the given cuboid. Attention: No intersection leads to zero or negative sizes! This needs to be checked by the caller.
Public methodIsAnyCornerInCuboid Returns true if any of the corners of the supplied cuboid is inside this cuboid.
Public methodIsAnyCornerNotInCuboid Returns true if any of the corners of the supplied cuboid is not inside this cuboid.
Public methodIsNoCornerInCuboid Returns true if no corner of the supplied cuboid is inside this cuboid.
Public methodIsPartlyInCuboid Returns true if any edge of the supplied cuboid is inside this cuboid and any other edge of the supplied cuboid is outside this cuboid.
Public methodIsSeparatedCuboid Returns true if there's no intersection between the two cuboids.
Public methodIsSizeEqual Checks if all sizes of this and the given Cuboid are the same.
Public methodScale(dvec2) Scales the bounding box.
Public methodScale(dvec3) Scales the bounding box.
Public methodToStringReturns a string that represents the current object.
(Overrides ObjectToString)
Public methodTransform Updates the size and origin of the cuboid by transforming all corner.
Public methodTransformCorners Returns an array containing all transformed corners.
Public methodUnionWith Returns the smallest cuboid containing both cuboids.
Top
See Also