[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graphics properties implementation
From: |
Michael Goffioul |
Subject: |
Re: Graphics properties implementation |
Date: |
Thu, 17 Jan 2008 17:00:29 +0100 |
On 1/14/08, Kai Habel <address@hidden> wrote:
> Hello Michael,
>
> yes I will look into the additional method needed, but it will take some
> time. After a first look into the respective jhandles file [1] it seems
> straightforward to translate the methods for face/vertex <--> X/Y/Z
> conversion and normals computation into C++.
>
> I assume these functions should be called (if needed) from a not yet
> existing validate method as well.
Indeed, that's a possible solution. Actually, IMO there's a need for a
built-in self-listener mechanism in the properties classes (the one
derived from base_properties); this mechanism would be responsible
for calling the appropriate update function. In practice, I mean something
like the following (I just included the relevant code):
class base_properties
{
public:
virtual void validate (const std::string& pname) { }
};
class patch
{
public:
class properties : public base_properties
{
public:
void update_xyz_data (void);
void validate (const std::string& pname)
{
if (pname == "faces" || pname == "vertices")
update_xyz ();
}
BEGIN_PROPERTIES(patch)
array_property faces v , Matrix ()
END_PROPERTIES
};
};
The 'v' modifier would expand set_faces as
void set_faces (const octave_value& v)
{
if (! error_state)
{
faces = v;
validate ("faces");
mark_modified ();
}
}
This should fit pretty easy in the code generation. Shai, John: comments?
Michael.
- Re: Graphics properties implementation, (continued)
- Re: Graphics properties implementation, Ben Abbott, 2008/01/13
- Re: Graphics properties implementation, Ben Abbott, 2008/01/13
- Re: Graphics properties implementation, Kai Habel, 2008/01/13
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/13
- Re: Graphics properties implementation, John W. Eaton, 2008/01/14
- Re: Graphics properties implementation, Kai Habel, 2008/01/14
- Re: Graphics properties implementation,
Michael Goffioul <=
- Re: Graphics properties implementation, Shai Ayal, 2008/01/17
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/17
- Re: Graphics properties implementation, Shai Ayal, 2008/01/17
- Re: Graphics properties implementation, John W. Eaton, 2008/01/17
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/17
- Re: Graphics properties implementation, John W. Eaton, 2008/01/14