<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_shape</id>
		<title>Man shape - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_shape"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_shape&amp;action=history"/>
		<updated>2026-05-03T11:34:55Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.8.2</generator>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_shape&amp;diff=3976&amp;oldid=prev</id>
		<title>Laine at 20:58, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_shape&amp;diff=3976&amp;oldid=prev"/>
				<updated>2007-06-11T20:58:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Files==&lt;br /&gt;
&lt;br /&gt;
 /def/descriptor/shape.c&lt;br /&gt;
 /lib/descriptors/shape.h&lt;br /&gt;
 /lib/geometry.h&lt;br /&gt;
 /def/geometry&lt;br /&gt;
 /daemon/geometry.c&lt;br /&gt;
 /lib/common_shapes.h&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Shape descriptors are used to specify the shape of an object.  This can, in&lt;br /&gt;
turn, be used to determine its volume, which in conjunction with material&lt;br /&gt;
composition elements (see 'man element') can determine its mass and other&lt;br /&gt;
properties.&lt;br /&gt;
&lt;br /&gt;
Shape descriptors are not intended to be fully precise definitions of the&lt;br /&gt;
object's shape, and are more of an effort to define its general dimensions&lt;br /&gt;
to a near enough tolerance for practical purposes.&lt;br /&gt;
&lt;br /&gt;
When working with shape descriptors, you will generally want to #include&lt;br /&gt;
&amp;lt;geometry.h&amp;gt;, which defines various useful macros and includes shape.h.&lt;br /&gt;
&lt;br /&gt;
Shape descriptors rely heavily on the geometry definitions managed through&lt;br /&gt;
/daemon/geometry.c, /lib/geometry.h, and /def/geometry.  Some of these&lt;br /&gt;
geometries describe precise ideal shapes (Geometry_Sphere, Geometry_Cube)&lt;br /&gt;
and others describe useful approximations (Geometry_Anthropoid).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Live&amp;quot; shape descriptors in use by objects should not be directly modified&lt;br /&gt;
because the changes will not be properly taken into account.  Changes to an&lt;br /&gt;
object's shape should be done by calling set_shape() in it, possibly with&lt;br /&gt;
an argument consisting of a copy of its previous shape descriptor that has&lt;br /&gt;
been altered in some fashion.&lt;br /&gt;
&lt;br /&gt;
/lib/common_shapes.h defines a number of helpful shape specifications that&lt;br /&gt;
make it unnecessary to write your own shape dimensions in many situations,&lt;br /&gt;
and otherwise provide useful examples.&lt;br /&gt;
&lt;br /&gt;
Though the shapes most relevant to our usage are the three-dimensional&lt;br /&gt;
shapes, the geometry mechanics also understand various two-dimensional&lt;br /&gt;
shapes.  These should never be set as the shapes of game objects, however.&lt;br /&gt;
&lt;br /&gt;
There is an entire class of hollow geometries, both two-dimensional and&lt;br /&gt;
three-dimensional, which are essentially versions of a shape with an added&lt;br /&gt;
parameter, thickness.  For instance, Geometry_Ball is a hollow version of&lt;br /&gt;
Geometry_Sphere; Geometry_Sphere's only dimension is a Shape_Radius, where&lt;br /&gt;
Geometry_Ball has a Shape_Radius and a Shape_Thickness.  Additional values&lt;br /&gt;
can be calculated for hollow shapes, as described under Support Functions.&lt;br /&gt;
&lt;br /&gt;
===Public Fields===&lt;br /&gt;
&lt;br /&gt;
Shape_Type: The geometric figure described; must be a valid geometry type,&lt;br /&gt;
and will be converted to the type's integer geometry code.&lt;br /&gt;
&lt;br /&gt;
===Virtual Fields===&lt;br /&gt;
&lt;br /&gt;
The virtual fields of a shape descriptor are the various dimensions of its&lt;br /&gt;
particular shape, as determined by the geometry definition it uses for its&lt;br /&gt;
type.  You can review /lib/descriptors/shape.h for the full list, or look&lt;br /&gt;
at geometry definitions in /def/geometry to see which fields they use.  All&lt;br /&gt;
dimensions are always in the standard Ain Soph unit of distance, the dimin&lt;br /&gt;
(decimeter).&lt;br /&gt;
&lt;br /&gt;
===Internal Fields===&lt;br /&gt;
&lt;br /&gt;
Shape_Params: This is where the shape dimension information derived from&lt;br /&gt;
the virtual fields, in relation to the shape geometry, are stored.&lt;br /&gt;
&lt;br /&gt;
Shape_Tag: The tag for the descriptor system.&lt;br /&gt;
&lt;br /&gt;
===Support Functions===&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Volume(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the volume of the specified three-dimensional shape, in balaths&lt;br /&gt;
(liters).&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Surface_Area(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the surface area of the specified three-dimensional shape, in&lt;br /&gt;
square dimins (square decimeters).  In the case of a hollow shape, this&lt;br /&gt;
will include all surfaces.&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Volume_Enclosed(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the volume enclosed by the specified hollow three-dimensional&lt;br /&gt;
shape, in balaths (liters).&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Inner_Surface_Area(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the inner surface area of the specified hollow three-dimensional&lt;br /&gt;
shape, in square dimins (square decimeters).&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Outer_Surface_Area(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the outer surface area of the specified hollow three-dimensional&lt;br /&gt;
shape, in square dimins (square decimeters).&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Volume_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a three-dimensional shape&lt;br /&gt;
of the type and with the proportions of that specified to have a volume&lt;br /&gt;
equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Surface_Area_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a three-dimensional shape&lt;br /&gt;
of the type and with the proportions of that specified to have a surface&lt;br /&gt;
area equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Volume_Enclosed_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a hollow three-dimensional&lt;br /&gt;
shape of the type and with the proportions of that specified to have an&lt;br /&gt;
enclosed volume equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Inner_Surface_Area_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a hollow three-dimensional&lt;br /&gt;
shape of the type and with the proportions of that specified to have an&lt;br /&gt;
inner surface area equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Outer_Surface_Area_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a hollow three-dimensional&lt;br /&gt;
shape of the type and with the proportions of that specified to have an&lt;br /&gt;
outer surface area equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Area(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the area of the specified two-dimensional shape, in square dimins&lt;br /&gt;
(square decimeters).&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Perimeter(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the perimeter distance of the specified two-dimensional shape, in&lt;br /&gt;
dimins (decimeters).  In the case of a hollow two-dimensional shape, this&lt;br /&gt;
will be the total perimeter along all edges.&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Area_Enclosed(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the area enclosed by the specified hollow two-dimensional shape,&lt;br /&gt;
in square dimins (square decimeters).&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Inner_Perimeter(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the inner perimeter of the specified hollow two-dimensional shape,&lt;br /&gt;
in dimins (decimeters).&lt;br /&gt;
&lt;br /&gt;
'''float Shape_Outer_Perimeter(mixed spec)'''&lt;br /&gt;
&lt;br /&gt;
Returns the outer perimeter of the specified hollow two-dimensional shape,&lt;br /&gt;
in dimins (decimeters).&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Area_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a two-dimensional shape&lt;br /&gt;
of the type and with the proportions of that specified to have an area&lt;br /&gt;
equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Perimeter_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a two-dimensional shape&lt;br /&gt;
of the type and with the proportions of that specified to have a perimeter&lt;br /&gt;
equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Area_Enclosed_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a hollow two-dimensional&lt;br /&gt;
shape of the type and with the proportions of that specified to have an&lt;br /&gt;
enclosed area equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Area_Inner_Perimeter_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a hollow two-dimensional&lt;br /&gt;
shape of the type and with the proportions of that specified to have an&lt;br /&gt;
inner perimeter equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''float array Shape_Area_Outer_Perimeter_Param(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns an array of the parameters necessary for a hollow two-dimensional&lt;br /&gt;
shape of the type and with the proportions of that specified to have an&lt;br /&gt;
outer perimeter equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''descriptor Shape_Resize(mixed spec, float value)'''&lt;br /&gt;
&lt;br /&gt;
Returns a descriptor with the same relative proportions as that specified&lt;br /&gt;
but with its volume (three-dimensional shapes) or area (two-dimensional&lt;br /&gt;
shapes) equal (within a small tolerance) to the value given.&lt;br /&gt;
&lt;br /&gt;
'''descriptor Shape_Universal(descriptor dxr)'''&lt;br /&gt;
&lt;br /&gt;
Used to ensure that a given descriptor is shared via the global shape&lt;br /&gt;
descriptor cache.  The descriptor returned, which may be the same as the&lt;br /&gt;
one sent, is guaranteed to be shared.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[man descriiptors|descriptors(mechanisms)], [[man set shape|set_shape(lfun)]], [[man query shape|query_shape(lfun)]]&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>