box3d.cpp revision 6b541bbd96323978fe9df3278efad54d895a9f04
#define __SP_3DBOX_C__
/*
* SVG <box3d> implementation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
* Maximilian Albert <Anhalter42@gmx.de>
*
* Copyright (C) 2007 Authors
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "box3d.h"
static Inkscape::XML::Node *sp_3dbox_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
//static gchar *sp_3dbox_description(SPItem *item);
//static void sp_3dbox_set_shape(SPShape *shape);
static SPGroupClass *parent_class;
sp_3dbox_get_type(void)
{
if (!type) {
sizeof(SP3DBoxClass),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(SP3DBox),
16, /* n_preallocs */
NULL, /* value_table */
};
}
return type;
}
static void
{
//item_class->description = sp_3dbox_description;
}
static void
{
for (int i = 0; i < 6; ++i) {
}
}
static void
{
}
//sp_object_read_attr(object, "width");
}
{
//SP3DBox *box3d = SP_3DBOX(object);
switch (key) {
/***
case SP_ATTR_WIDTH:
rect->width.readOrUnset(value);
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
***/
default:
}
break;
}
}
static void
{
//SP3DBox *box3d = SP_3DBOX(object);
/* Invoke parent method */
//sp_3dbox_set_shape (box3d);
}
static Inkscape::XML::Node *sp_3dbox_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
{
// FIXME: How to handle other contexts???
return repr;
}
for (int i = 0; i < 6; ++i) {
}
}
}
return repr;
}
void
{
// FIXME: Why does the following call not automatically update the children
// of box3d (which is an SPGroup, which should do this)?
//SP_OBJECT(box3d)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
/**
SP_OBJECT(box3d->path_face1)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
SP_OBJECT(box3d->path_face2)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
SP_OBJECT(box3d->path_face3)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
SP_OBJECT(box3d->path_face4)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
SP_OBJECT(box3d->path_face5)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
SP_OBJECT(box3d->path_face6)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
***/
}
static void
// FIXME: Note that this is _not_ the virtual set_shape() method inherited from SPShape,
// since SP3DBox is inherited from SPGroup. The following method is "artificially"
// called from sp_3dbox_update().
//sp_3dbox_set_shape(SPShape *shape)
{
// FIXME: How to handle other contexts???
return;
// FIXME: Why must the coordinates be flipped vertically???
//SPDocument *doc = SP_OBJECT_DOCUMENT(box3d);
//gdouble height = sp_document_height(doc);
/* Curve-adaption variant: */
}
}
void
sp_3dbox_compute_specific_corners (SP3DBoxContext *box3d_context, NR::Point &corner1, NR::Point &corner2, NR::Point &corner3, NR::Point &corner4)
{
// TODO: Check for numerical stability and handle "wrong" cases more gracefully.
// (This now mostly applies to the intersection code in the PerspectiveLine class)
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :