[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Material.java,NONE,1.1 Surface.java,1
Status: Pre-Alpha
Brought to you by:
henryml
From: Nikolaj B. <nbr...@us...> - 2006-01-05 10:40:47
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18101/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Added Files: Material.java Log Message: Added the Materials class, and now Surfaces have a frontside and a backside Material. Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Surface.java 4 Jan 2006 14:30:07 -0000 1.63 --- Surface.java 5 Jan 2006 10:40:39 -0000 1.64 *************** *** 44,47 **** --- 44,53 ---- private Space backDomain; + /** The material on the frontside of the surface */ + private Material frontMaterial; + + /** The material on the backside of the surface */ + private Material backMaterial; + /** The exterior surface if this is a hole */ private Surface exterior; *************** *** 677,680 **** --- 683,726 ---- /** + * Get the material on the backside of the surface + * @return the backmaterial + * @hibernate.one-to-one + * column="BACK_MATERIAL_ID" + * class="net.sourceforge.bprocessor.model.Material" + */ + public Material getBackMaterial() { + return backMaterial; + } + + /** + * Set the material on the backside of the surface + * @param back the Material + */ + public void setBackMaterial(Material back) { + backMaterial = back; + + } + + /** + * Get the material on the frontside of the surface + * @return the frontmaterial + * @hibernate.one-to-one + * column="FRONT_MATERIAL_ID" + * class="net.sourceforge.bprocessor.model.Material" + */ + public Material getFrontMaterial() { + return frontMaterial; + } + + /** + * Set the material on the frontside of the surface + * @param front the Material + */ + public void setFrontMaterial(Material front) { + frontMaterial = front; + + } + + /** * Get the domain behind the surface * @return the backdomain --- NEW FILE: Material.java --- //--------------------------------------------------------------------------------- // $Id: Material.java,v 1.1 2006/01/05 10:40:39 nbramsen Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; /** * The Material of a Surface */ public class Material { /** The name of the material */ private String name; /** The color of the material */ private float[] color; /** * Default Constructor for space */ public Material() { } /** * Constructor for space * @param name The name of the material * @param color The color of the material */ public Material(String name, float[] color) { setName(name); setColor(color); } /** * Get the name * @return The name * @hibernate.property */ public String getName() { return name; } /** * Set the name * @param name The name */ public void setName(String name) { this.name = name; } /** * Get the color * @return The color * @hibernate.property */ public float[] getColor() { return color; } /** * Set the color * @param color The color */ public void setColor(float[] color) { this.color = color; } } |