Action:
|
Sets a property of a texture space.
|
|
Filename:
|
rbase/rnd_scm/tmap_scm.cxx
|
|
APIs:
|
api_rh_get_texture_space_args, api_rh_set_texture_space_arg
|
|
Syntax:
|
(texture-space:set-prop texture-space name value)
|
|
Arg Types:
|
texture-space
|
entity
|
|
name
|
string
|
|
value
|
integer | real | gvector
|
|
Returns:
|
unspecified
|
|
Description:
|
Texture space controls how a a wrapped material entity is applied to a face or solid body. A texture space is applied to an entity using
entity:set-texture-space.
|
|
|
texture-space specifies the texture space entity.
|
|
|
name specifies the texture space property name. The properties are:
|
|
|
"ambient" illuminates all surfaces equally regardless of orientation. The intensity of the source (as a scalar quantity) is determined by
intensity and
color. The default values are:
|
|
|
intensity
|
1.0 (real)
|
|
color
|
#[color 1 1 1]
|
|
|
"arbitrary plane" is point mapping onto an arbitrary plane. The default values are:
|
|
|
scale
|
1.0 (real)
|
|
aspect ratio
|
1.0 (real)
|
|
origin
|
#[gvector 0 0 0]
|
|
normal vector
|
#[gvector 0 0 1]
|
|
up vector
|
#[gvector 0 1 0]
|
|
|
"auto axis" is point mapping by one of the three coordinate axes (x,
y, and
z axes).
|
|
|
"cylindrical" is point mapping onto a cylinder. The default values are:
|
|
|
scale around axis
|
1.0 (real)
|
|
scale along axis
|
1.0 (real)
|
|
centre point
|
#[gvector 0 0 0]
|
|
axis direction
|
#[gvector 0 0 1]
|
|
origin
|
#[gvector 1 0 0]
|
|
|
"spherical" is point mapping onto a sphere. The default values are:
|
|
|
latitude scale
|
1.0 (real)
|
|
longitude scale
|
1.0 (real)
|
|
centre point
|
#[gvector 0 0 0]
|
|
origin
|
#[gvector 1 0 0]
|
|
axis direction
|
#[gvector 0 0 1]
|
|
|
"uv" maps parametric coordinate system to the texture space. The default values are:
|
|
|
u scale
|
1.0 (real)
|
|
v scale
|
1.0 (real)
|
|
|
"x plane" provides point mapping onto a plane of constant
x. The default value is:
|
|
|
scale
|
1.0 (real)
|
|
|
"y plane" provides point mapping onto a plane of constant
y. The default value is:
|
|
|
scale
|
1.0 (real)
|
|
|
"z plane" provides point mapping onto a plane of constant
z. The default value is:
|
|
|
scale
|
1.0 (real)
|
|
|
value specifies the value of the associated property name.
|
|
|
The
Advanced Rendering Component is required to display texture space on wrapped materials. However, in the
Basic Rendering Component, the texture space may be created, its properties changes, and the texture space entity associated with a model entity. However,
Basic Rendering Component does not display the results.
|
|
Example:
|
; texture-space:set-prop
|
|
; Get a list of valid texture space shader types.
|
|
(texture-space:types)
|
|
;; ("arbitrary plane" "auto axis" "cylindrical"
|
|
;; "spherical" "uv" "x plane" "y plane" "z plane")
|
|
; Create a texture space.
|
|
(define texture1 (texture-space "arbitrary plane"))
|
|
;; texture1
|
|
; Set a property of the texture space.
|
|
(texture-space:set-prop texture1
|
|
|
"aspect ratio" 0.75)
|
|
;; ()
|