Rhino C++ API
8.13
|
#include <opennurbs_plus_rectpack.h>
Public Member Functions | |
ON_PackedTextureRectangle () | |
The default constructor sets all fields to zero. More... | |
void | UseEntireTexture () |
Public Attributes | |
double | m_height |
rectangle height More... | |
ON__INT_PTR | m_id |
for later identification More... | |
class ON_PackedTextureRectangle * | m_next |
double | m_tex_dx |
double | m_tex_dy |
char | m_tex_rotated |
double | m_tex_x0 |
double | m_tex_x1 |
double | m_tex_y0 |
lower left normalized texture coordinate More... | |
double | m_tex_y1 |
upper right normalized texture coordinate More... | |
double | m_width |
rectangle width More... | |
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.
ON_PackedTextureRectangle::ON_PackedTextureRectangle | ( | ) |
The default constructor sets all fields to zero.
void ON_PackedTextureRectangle::UseEntireTexture | ( | ) |
OUTPUT: Description: Sets the m_tex_* output fields to use the entire normalized texture. m_rotate = 0; m_tex_x0 = 0.0; m_tex_y0 = 0.0; m_tex_x1 = 1.0; m_tex_y1 = 1.0; m_tex_dx = 1.0; m_tex_dy = 1.0;
double ON_PackedTextureRectangle::m_height |
rectangle height
ON__INT_PTR ON_PackedTextureRectangle::m_id |
for later identification
INPUT:
class ON_PackedTextureRectangle* ON_PackedTextureRectangle::m_next |
The default operator= and copy constructor work fine. Note that the m_next field is copied and you must adjust it as needed after making the copy. The input set of rectangles is managed as a linked list. Note that the default copy constructor and operator= copy the m_next value. If you make a copy, be sure to adjust the value m_next to something appropriate.
double ON_PackedTextureRectangle::m_tex_dx |
If you want to preserve the aspect of the input rectangle and have a uniform normalized texture coordinate scale for all the rectangles in the packing, limit yourself to using a normalized texture coordinate rectangle of size m_tex_dx by m_tex_dy inside the texture coordinate region specified by m_tex_x0,m_tex_y0 m_tex_x1,m_tex_y1. (m_tex_dx <= m_tex_x1 - m_tex_x0) (m_tex_dy <= m_tex_y1 - m_tex_y0)
double ON_PackedTextureRectangle::m_tex_dy |
char ON_PackedTextureRectangle::m_tex_rotated |
tex_rotated will be set to 0 or 1 0 = not rotated The "width" direction of the rect corresponds to the "x" direction of the normalized texture coordinates and the "height" direction of the rect corresponds to the "y" direction of the normalized texture coordinates. 1 = rotated The "width" direction of the rect corresponds to the "y" direction of the normalized texture coordinates and the "height" direction of the rect corresponds to the "x" direction of the normalized texture coordinates.
double ON_PackedTextureRectangle::m_tex_x0 |
The normalized texture coordinate region this rectangle can use has lower left corner at (m_tex_x0, m_tex_x1) and upper right corner at (m_tex_y0, m_tex_y1)
double ON_PackedTextureRectangle::m_tex_x1 |
double ON_PackedTextureRectangle::m_tex_y0 |
lower left normalized texture coordinate
double ON_PackedTextureRectangle::m_tex_y1 |
upper right normalized texture coordinate
double ON_PackedTextureRectangle::m_width |
rectangle width
INPUT RECTANGLE: The input rectangle size is typically in world units, but can be in any unit system.