Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::gfxutils::CylinderSpec Struct Reference

Cylinder. More...

#include "shapeutils.h"

Inheritance diagram for ion::gfxutils::CylinderSpec:
Collaboration diagram for ion::gfxutils::CylinderSpec:

Public Types

enum  VertexType {
  kPosition,
  kPositionTexCoords,
  kPositionNormal,
  kPositionTexCoordsNormal
}
 This enum is used to specify what per-vertex attributes should be included in a Shape. More...
 

Public Member Functions

 CylinderSpec ()
 

Public Attributes

bool has_top_cap
 
bool has_bottom_cap
 
size_t shaft_band_count
 
size_t cap_band_count
 
size_t sector_count
 
float top_radius
 
float bottom_radius
 
float height
 
base::AllocatorPtr allocator
 
math::Point3f translation
 The order of operations is: scale, then rotate, then translate. More...
 
float scale
 
math::Matrix3f rotation
 
VertexType vertex_type
 
gfx::BufferObject::UsageMode usage_mode
 UsageMode for all created BufferObject instances. More...
 

Detailed Description

Cylinder.

This struct is used to specify details of the construction of an cylinder shape for BuildCylinderShape(). A cylinder is centered on the Y axis and may have different top and bottom radii. The top and bottom caps will be included if the corresponding flag is set in the CylinderSpec and the corresponding radius is not 0. The shaft consists of a series of cylindrical bands, each of which is divided into longitudinal sectors. If the number of specified bands is less than 1, it is considered to be 1. If the number of specified sectors is less than 3, it is considered to be 3. The caps, if present, are divided into concentric bands, each of which is divided into sectors. S texture coordinates increase on the shaft from west to east around the cylinder (with +Y to the north) with the seam at -Z. T texture coordinates on the shaft range from 0 at the bottom to 1 at the top. S texture coordinates on both caps range from 0 at the -X side to 1 at the +X side. T texture coordinates on the top cap range from 0 at the +Z side to 1 at the -Z side, while the reverse is true on the bottom cap.

Definition at line 283 of file shapeutils.h.

Member Enumeration Documentation

This enum is used to specify what per-vertex attributes should be included in a Shape.

Only the three geometric attributes available in the global registry ("aVertex", "aNormal", and "aTexCoords") are supported.

Enumerator
kPosition 
kPositionTexCoords 
kPositionNormal 
kPositionTexCoordsNormal 

Definition at line 44 of file shapeutils.h.

Constructor & Destructor Documentation

ion::gfxutils::CylinderSpec::CylinderSpec ( )
inline

Definition at line 284 of file shapeutils.h.

Member Data Documentation

float ion::gfxutils::CylinderSpec::bottom_radius

Definition at line 299 of file shapeutils.h.

size_t ion::gfxutils::CylinderSpec::cap_band_count

Definition at line 296 of file shapeutils.h.

bool ion::gfxutils::CylinderSpec::has_bottom_cap

Definition at line 294 of file shapeutils.h.

bool ion::gfxutils::CylinderSpec::has_top_cap

Definition at line 293 of file shapeutils.h.

float ion::gfxutils::CylinderSpec::height

Definition at line 300 of file shapeutils.h.

math::Matrix3f ion::gfxutils::ShapeSpec::rotation
inherited

Definition at line 59 of file shapeutils.h.

float ion::gfxutils::ShapeSpec::scale
inherited

Definition at line 58 of file shapeutils.h.

size_t ion::gfxutils::CylinderSpec::sector_count

Definition at line 297 of file shapeutils.h.

size_t ion::gfxutils::CylinderSpec::shaft_band_count

Definition at line 295 of file shapeutils.h.

float ion::gfxutils::CylinderSpec::top_radius

Definition at line 298 of file shapeutils.h.

math::Point3f ion::gfxutils::ShapeSpec::translation
inherited

The order of operations is: scale, then rotate, then translate.

Definition at line 57 of file shapeutils.h.

gfx::BufferObject::UsageMode ion::gfxutils::ShapeSpec::usage_mode
inherited

UsageMode for all created BufferObject instances.

This also affects whether data is considered wipeable. (gfx::BufferObject::kStaticDraw).

Definition at line 63 of file shapeutils.h.

VertexType ion::gfxutils::ShapeSpec::vertex_type
inherited

Definition at line 60 of file shapeutils.h.


The documentation for this struct was generated from the following file: