|
enum | FILTER : unsigned int { FILTER::nearest_filter = 0,
FILTER::linear_filter = 1
} |
|
enum | MAPPING_CHANNEL : unsigned int {
MAPPING_CHANNEL::tc_channel = 0U,
MAPPING_CHANNEL::default_channel = 1U,
MAPPING_CHANNEL::screen_based_channel = 0xFFFFFFF1U,
MAPPING_CHANNEL::wcs_channel = 0xFFFFFFF2U,
MAPPING_CHANNEL::wcs_box_channel = 0xFFFFFFF3U,
MAPPING_CHANNEL::environment_map_box_channel = 0xFFFFFFF4U,
MAPPING_CHANNEL::environment_map_light_probe_channel = 0xFFFFFFF5U,
MAPPING_CHANNEL::environment_map_spherical_channel = 0xFFFFFFF6U,
MAPPING_CHANNEL::environment_map_cube_map_channel = 0xFFFFFFF7U,
MAPPING_CHANNEL::environment_map_vcross_cube_map_channel = 0xFFFFFFF8U,
MAPPING_CHANNEL::environment_map_hcross_cube_map_channel = 0xFFFFFFF9U,
MAPPING_CHANNEL::environment_map_hemispherical_channel = 0xFFFFFFFAU,
MAPPING_CHANNEL::environment_map_emap_channel = 0xFFFFFFFFU,
MAPPING_CHANNEL::srfp_channel = 0xFFFFFFFEU,
MAPPING_CHANNEL::emap_channel = 0xFFFFFFFFU
} |
| list of pre-defined channel ids More...
|
|
enum | MODE : unsigned int { MODE::no_texture_mode = 0,
MODE::modulate_texture = 1,
MODE::decal_texture = 2,
MODE::blend_texture = 3
} |
|
enum | TYPE : unsigned int {
TYPE::no_texture_type = 0U,
TYPE::bitmap_texture = 1U,
TYPE::diffuse_texture = 1U,
TYPE::bump_texture = 2U,
TYPE::transparency_texture = 3U,
TYPE::opacity_texture = 3U,
TYPE::pbr_base_color_texture = 1U,
TYPE::pbr_subsurface_texture = 10U,
TYPE::pbr_subsurface_scattering_texture = 11U,
TYPE::pbr_subsurface_scattering_color_texture = 11U,
TYPE::pbr_subsurface_scattering_radius_texture = 12U,
TYPE::pbr_metallic_texture = 13U,
TYPE::pbr_specular_texture = 14U,
TYPE::pbr_specular_tint_texture = 15U,
TYPE::pbr_roughness_texture = 16U,
TYPE::pbr_anisotropic_texture = 17U,
TYPE::pbr_anisotropic_rotation_texture = 18U,
TYPE::pbr_sheen_texture = 19U,
TYPE::pbr_sheen_tint_texture = 20U,
TYPE::pbr_clearcoat_texture = 21U,
TYPE::pbr_clearcoat_roughness_texture = 22U,
TYPE::pbr_opacity_ior_texture = 23U,
TYPE::pbr_opacity_roughness_texture = 24U,
TYPE::pbr_emission_texture = 25U,
TYPE::pbr_ambient_occlusion_texture = 26U,
TYPE::pbr_displacement_texture = 28U,
TYPE::pbr_clearcoat_bump_texture = 29U,
TYPE::pbr_alpha_texture = 30U,
TYPE::pbr_opacity_texture = 3U,
TYPE::pbr_bump_texture = 2U,
TYPE::emap_texture = 86U
} |
|
enum | WRAP : unsigned int { WRAP::repeat_wrap = 0,
WRAP::clamp_wrap = 1
} |
|
enum | UserDataConflictResolution : unsigned char {
UserDataConflictResolution::destination_object = 0,
UserDataConflictResolution::source_object = 1,
UserDataConflictResolution::source_copycount_gt = 2,
UserDataConflictResolution::source_copycount_ge = 3,
UserDataConflictResolution::destination_copycount_gt = 4,
UserDataConflictResolution::destination_copycount_ge = 5,
UserDataConflictResolution::delete_item = 6
} |
|
|
| ON_Texture ()=default |
|
| ON_Texture (const ON_Texture &)=default |
|
| ~ON_Texture ()=default |
|
const ON_SHA1_Hash | ContentHash () const |
|
void | Dump (ON_TextLog &) const override |
|
bool | IsTiled (int dir, double *count, double *offset) const |
|
bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
| ON_Object overrides. More...
|
|
bool | IsWcsBoxProjected () const |
|
bool | IsWcsProjected () const |
|
ON_2dVector | Offset () const |
|
ON_Texture & | operator= (const ON_Texture &)=default |
|
bool | Read (ON_BinaryArchive &binary_archive) override |
|
ON_2dVector | Repeat () const |
|
bool | ReverseTextureCoordinate (int dir) |
|
double | Rotation () const |
|
void | SetBuiltInMappingChannel (ON_Texture::MAPPING_CHANNEL built_in_mapping_channel_as_unsigned) |
|
void | SetMappingChannel (unsigned int mapping_channel_id) |
|
void | SetOffset (const ON_2dVector &) |
|
void | SetRepeat (const ON_2dVector &) |
| These functions are helpers for m_uvw. More...
|
|
void | SetRotation (double) |
|
unsigned int | SizeOf () const override |
|
bool | SwapTextureCoordinate (int i, int j) |
|
bool | TileTextureCoordinate (int dir, double count, double offset) |
|
bool | Write (ON_BinaryArchive &binary_archive) const override |
|
| ON_Object () ON_NOEXCEPT |
|
| ON_Object (const ON_Object &) |
|
virtual | ~ON_Object () |
|
virtual ON_AggregateComponentStatus | AggregateComponentStatus () const |
|
bool | AttachUserData (class ON_UserData *pUserData) |
|
unsigned int | ClearAllComponentStates () const |
|
virtual unsigned int | ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const |
|
virtual unsigned int | ClearComponentStates (ON_ComponentStatus states_to_clear) const |
|
void | CopyUserData (const ON_Object &source_object) |
|
unsigned int | CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution) |
|
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
|
virtual bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
|
virtual void | DestroyRuntimeCache (bool bDelete=true) |
|
bool | DetachUserData (class ON_UserData *pUserData) |
|
void | EmergencyDestroy () |
|
class ON_UserData * | FirstUserData () const |
|
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
|
class ON_UserData * | GetUserData (const ON_UUID &userdata_uuid) const |
|
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
|
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
|
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
|
bool | IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const |
|
bool | IsKindOf (const ON_ClassId *pClassId) const |
|
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
|
virtual void | MemoryRelocate () |
|
virtual ON_UUID | ModelObjectId () const |
|
void | MoveUserData (ON_Object &source_object) |
|
unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
|
virtual ON::object_type | ObjectType () const |
|
ON_Object & | operator= (const ON_Object &) |
|
void | PurgeUserData () |
|
virtual unsigned int | SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const |
|
virtual unsigned int | SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const |
|
bool | SetUserString (const wchar_t *key, const wchar_t *string_value) |
|
int | SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace) |
|
bool | ThisIsNullptr (bool bSilentError) const |
|
void | TransformUserData (const class ON_Xform &xform) |
|
virtual bool | UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) |
|
int | UserStringCount () const |
|
|
static ON_Texture::MAPPING_CHANNEL | BuiltInMappingChannelFromUnsigned (unsigned int mapping_channel_as_unsigned) |
|
static int | Compare (const ON_Texture &a, const ON_Texture &b) |
|
static int | CompareAppearance (const ON_Texture &a, const ON_Texture &b) |
|
static ON_Texture::FILTER | FilterFromUnsigned (unsigned int filter_as_unsigned) |
|
static ON_Xform | GetPictureShrinkSurfaceTransformation (const class ON_Brep *original, const class ON_Brep *shrunk, const ON_Xform *error_return) |
|
static ON_Xform | GetPictureShrinkSurfaceTransformation (const class ON_Interval &original_udomain, const class ON_Interval &original_vdomain, const class ON_Interval &shrunk_udomain, const class ON_Interval &shrunk_vdomain, const ON_Xform *error_return) |
|
static ON_Xform | GetPictureShrinkSurfaceTransformation (const class ON_Surface *original, const class ON_Surface *shrunk, const ON_Xform *error_return) |
|
static bool | IsBuiltInMappingChannel (unsigned int mapping_channel_id) |
|
static ON_Texture::MODE | ModeFromUnsigned (unsigned int mode_as_unsigned) |
|
static ON_Texture::TYPE | TypeFromUnsigned (unsigned int type_as_unsigned) |
|
static ON_3dPoint | WcsBoxMapping (const ON_3dPoint &pt, const ON_3dVector &n) |
|
static ON_Texture::WRAP | WrapFromUnsigned (unsigned int wrap_as_unsigned) |
|
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. defines ON_Color and ON_Material Class ON_Texture
static ON_Xform ON_Texture::GetPictureShrinkSurfaceTransformation |
( |
const class ON_Brep * |
original, |
|
|
const class ON_Brep * |
shrunk, |
|
|
const ON_Xform * |
error_return |
|
) |
| |
|
static |
Parameters: original - [in] A brep used as a picture object (1 face with a bitmap texture applied) shrunk - [in] A copy of original with the face's surface shrunk in some way. The domain of the shrunk surface must be contained in the domain of the original surface. error_return - [in] value to return if the input parameters are not valid. If error_return is nullptr, then ON_Xform::Nan is returned when input parameters are not valid.
Returns: Texture transformation that will map a [0,1]x[0,1] to the appropriate sub rectangle of the picture image.
Example: ON_Brep original_picture = ...; ON_Brep shrunk_picture = original_picture; shrunk_picture.ShrinkSurfaces(); ON_Material original_material = ...; ON_Material new_material = original_material; ON_Texture& new_texture = new_material.m_textures[0]; new_texture.m_uvw = ON_Texture::GetPictureShrinkSurfaceTransformation( &original_picture, &shrunk_picture, &ON_Xform::IdentityXform)*new_texture.m_uvw;
Parameters: original_udomain - [in] original_vdomain - [in] original picture surface domain shrunk_udomain - [in] shrunk_vdomain - [in] sub-domain of the original picture. error_return - [in] value to return if the input parameters are not valid. If error_return is nullptr, then ON_Xform::Nan is returned when input parameters are not valid.
Returns: Texture transformation that will map a [0,1]x[0,1] to the appropriate sub rectangle of the picture image.
Example: ON_Brep original_picture = ...; ON_Brep shrunk_picture = original_picture; shrunk_picture.ShrinkSurfaces(); ON_Material original_material = ...; ON_Material new_material = original_material; ON_Texture& new_texture = new_material.m_textures[0]; new_texture.m_uvw = ON_Texture::GetPictureShrinkSurfaceTransformation( &original_picture, &shrunk_picture, &ON_Xform::IdentityXform)*new_texture.m_uvw;
Parameters: original - [in] A surface used as a picture object (1 face with a bitmap texture applied) shrunk - [in] A surface trimmed/split from the original error_return - [in] value to return if the input parameters are not valid. If error_return is nullptr, then ON_Xform::Nan is returned when input parameters are not valid.
Returns: Texture transformation that will map a [0,1]x[0,1] to the appropriate sub rectangle of the picture image.
Example: ON_Brep original_picture = ...; ON_Brep shrunk_picture = original_picture; shrunk_picture.ShrinkSurfaces(); ON_Material original_material = ...; ON_Material new_material = original_material; ON_Texture& new_texture = new_material.m_textures[0]; new_texture.m_uvw = ON_Texture::GetPictureShrinkSurfaceTransformation( &original_picture, &shrunk_picture, &ON_Xform::IdentityXform)*new_texture.m_uvw;
This field is used for textures with type bitmap_texture that reference bitmap files that do not have an alpha channel and is used to set runtime alpha values. It needs to be parsed when the texture is loaded and can be ignored at runtime.
If m_transparency_id is not nil, it is the id of another texture in the ON_Material.m_textures[] array that has type m_transparency_texture. The runtime bitmap_texture's alpha is set to (255-max(R,G,B)) (the "value" in the hue, saturation,value sense) of the corresponding transparency_texture pixel.
For example, if you had a bitmap texture that was green with purple dots saved in a RGB .bmp file and you wanted the purple dots to be semi-transparent, you could create another bitmap that was black, where the original was green, and gray, where the original was purple, have an transparency_texture reference the white/gray bitmap, and have the bitmap_texture's m_transparency_id reference the transparency map.
This field is used for textures with type bitmap_texture that reference bitmap files that do not have an alpha channel and is used to set runtime alpha values. It needs to be parsed when the texture is loaded and can be ignored at runtime.
If ON_UNSET_COLOR != m_transparent_color, then a pixel in the bitmap file with a matching RGB value is assigned the alpha value (ON_Color::Alpha) in m_transparent_color. The intended use is for non-rectangular decals defined by RGB bitmaps in files that don't save an alpha channel.
For example if the decal is a red number 7 with a white background, then you would set m_transparent_color's RGB to white and its A to zero.