getArticleRenderingSetup
Synopsis
ARSRenderingSetup getArticleRenderingSetup(SessionId sessionId,
string catalogId,
string manuId,
string seriesId,
string baseArtNr,
string *ofmlVarCode,
string[] viewIds)
throws BasketServiceFault;
See also: SessionId, BasketServiceFault, ARSRenderingSetup
The operation getArticleRenderingSetup is used to access data from ARS (article-specific rendering setup) database1.
The rendering setup consists of information about the camera setup (position and orientation) and information about lighting (ambient light and light sources as known from OpenGL).
struct ARSRenderingSetup {
ARSCamera *camera; // element
ARSLighting *lighting; // element
}
See also: ARSCamera, ARSLighting
Reference point, viewpoint and positions of light sources are defined by the origin of some coordinate system and the point’s or position’s coordinates within that coordinate system. The coordinate system can be cartesian or spherical.
enum ARSCoordinateSystem {
Cartesian,
Spherical
}
The origin can be defined as either the origin of the local coordinate system, the center of the bounding box plus some offset, the reference point or the view point.
enum ARSOriginType {
LocalCoordinateSystem,
BoundingBox,
ReferencePoint,
ViewPoint
}
The offset is computed as the size of the bounding box in each direction multiplied by x/y/z scaling factors defined as part of the origin.
struct ARSOrigin {
ARSOriginType type; // attribute
float x; // attribute
float y; // attribute
float z; // attribute
}
See also: ARSOriginType
As mentioned above, coordinates are specified as either cartesian or spherical. The member coordinateSystem of ARSCoordinates defines the type of coordinates used. The actual data type corresponds to the specified type of coordinate system.
abstract struct ARSCoordinates {
ARSCoordinateSystem coordinateSystem; // attribute
}
See also: ARSCoordinateSystem
If cartesian coordinates are used, the axes of the coordinate system have the same direction as the corresponding axes of the object’s local coordinate system.
struct ARSCartesianCoordinates : ARSCoordinates {
float x; // attribute
float y; // attribute
float z; // attribute
}
See also: ARSCoordinates
If spherical coordinates are used, the zenith direction corresponds to the direction of the y-axis of the object’s local coordinate system, and the azimuth is measured counter-clockwise from the positive z-axis (0°) to the positive x-axis (90°).2
Azimuth and elevation are specified in degree. EAIWS does not impose any limits on the values of radius, azimuth and elevation.
struct ARSSphericalCoordinates : ARSCoordinates {
float azimuth; // attribute
float elevation; // attribute
float radius; // attribute
}
See also: ARSCoordinates
The origin type of the reference point is either LocalCoordinateSystem or BoundingBox. The coordinates of the reference point are always specified as cartesian coordinates.
struct ARSReferencePoint {
ARSOrigin origin; // element
ARSCartesianCoordinates coordinates; // element
}
See also: ARSOrigin
The origin of the viewpoint is either LocalCoordinateSystem, BoundingBox or ReferencePoint.
struct ARSViewpoint {
ARSOrigin origin; // element
ARSCoordinates coordinates; // element
}
See also: ARSOrigin, ARSCoordinates
In addition to reference and viewpoint, the camera setup defines the projection mode and zoom.
In perspective mode, the zoom is passed unmodified to gluPerspective, defining the field of view angle, in degrees. In orthographic mode, the top and bottom values passed to glOrtho are computed as ±tan(zoom ∙ π / 180.0), thus defining the coordinates for the top and bottom horizontal clipping planes.
enum ARSProjectionMode {
Perspective,
Orthographic
}
struct ARSCamera {
ARSReferencePoint referencePoint; // element
ARSViewpoint viewpoint; // element
ARSProjectionMode projectionMode; // attribute
float zoom; // attribute
}
See also: ARSReferencePoint, ARSViewpoint, ARSProjectionMode
Lighting information consists of the ambient light and a possibly empty list of light sources.
struct ARSLighting {
Color ambientLight; // element
ARSLightSource[] lightSources; // element
}
See also: Color, ARSLightSource
Light sources are defined the same way as in OpenGL.
enum ARSLightSourceType {
Directional,
Positional
}
struct ARSLightSource {
ARSOrigin origin; // element
ARSCoordinates coordinates; // element
Color ambientLight; // element
Color diffuseLight; // element
Color specularLight; // element
float constantAttenuation; // attribute
float linearAttenuation; // attribute
float quadraticAttenuation; // attribute
ARSLightSourceType type; // attribute
}
See also: ARSOrigin, ARSCoordinates, Color, ARSLightSourceType
Lights are defined by their red, green and blue components, with values being between zero and one, both inclusive.
struct Color {
float red; // attribute
float green; // attribute
fluat blue; // attribute
}
The catalog ID, manufacturer ID and series ID passed to getArticleRenderingSetup must be specified and valid.
The base article number must be specified and must not be empty.
The OFML variant code must be a valid OFML variant code. It should be equal to the OFML variant code of the article instance whose rendering setup is to be determined. If it is missing, an empty OFML variant code is assumed instead.
The list of view IDs may be empty. If so, a list containing only the default view ID (an empty string) is used instead.
For each view ID, the operation looks for a rendering setup matching the specified parameters. The first one found is returned. If no rendering setup is found, nothing is returned.