Search found 40 matches

by alied
Fri Sep 23, 2011 2:54 am
Forum: Developers
Topic: Details about rendering engine
Replies: 1
Views: 4224

Re: Details about rendering engine

Hi nasevz
You can find all your answers in PhotoRenderer.java[1]; specially the constructor

public PhotoRenderer(Home, Object3DFactory, Quality)

and

public void render(BufferedImage, Camera, ImageObserver)

As for levels 1 and 2, you can start by PhotoPanel.java[2], specially

private void ...
by alied
Sat Aug 27, 2011 2:36 am
Forum: Developers
Topic: Place Furniture randomly
Replies: 5
Views: 3617

Re: Place Furniture randomly

Just out of curiosity: how do you plan to do it?
A plugin is the most straightforward way I can think of.
by alied
Thu Aug 25, 2011 1:56 am
Forum: Developers
Topic: Place Furniture randomly
Replies: 5
Views: 3617

Re: Place Furniture randomly

Well, I think it is because that feature is not a standard one for home design (nor one most people would ask for). However, it is a chance for you to develop such a feature.
It should not be that difficult to develop a plugin which does that. One solution can be to randomly move the selected ...
by alied
Tue Jun 28, 2011 9:05 pm
Forum: Wishlist
Topic: Feature "Replace with..."
Replies: 5
Views: 4366

Re: Feature "Replace with..."

In deed, if I remove a HomePieceOfFurniture from the Home, create a new one with the removed dimensions and coordinates (and maybe some other properties), and then add it to the Home (I can get the current Home from a Plugin, then get the selected items, remove and add) the rest would be a UI to ...
by alied
Thu Apr 21, 2011 6:50 pm
Forum: Developers
Topic: Plugin - Creating Objects with other Properties
Replies: 25
Views: 23831

Re: Plugin - Creating Objects with other Properties

Still, there is something you can do without messing with the code.
in your Plugin constructor, get the Home and add a listener:

getHome().addFurnitureListener(new CollectionListener<HomePieceOfFurniture>(){
void collectionChanged(CollectionEvent<HomePieceOfFurniture> ev){
//check whether it is ...
by alied
Mon Apr 18, 2011 7:02 pm
Forum: New versions
Topic: Sweet Home 3D 3.2
Replies: 8
Views: 48763

Re: Sweet Home 3D 3.2

Hallo Hans:
that should be a Ubuntu issue. I'm using Windows XP SP3, SH3D Version 3.2 Beta 4, Java version 1.7.0-ea, and everything works fine.
There is a small bug in the grid: it doesn't show subdivisions
Even zooming in and out up (or down) to its limits.
Also, inserting furniture is only ...
by alied
Mon Apr 18, 2011 6:33 pm
Forum: Developers
Topic: Plugin - Creating Objects with other Properties
Replies: 25
Views: 23831

Re: Plugin - Creating Objects with other Properties

how can I control it without changing the SH3D code?
you can add a listener to your Home object[1], then create your custom PieceOfFurniture, delete the original, and add yours (remember either remove your listener before adding your object, or check before if it's your item, or you can get into a ...
by alied
Thu Apr 07, 2011 12:48 pm
Forum: Developers
Topic: Add furniture progamatically !!!
Replies: 7
Views: 4753

Re: Add furniture progamatically !!!

some useful URLs:
HomePieceOfFurniture constructor[1]
Adding a HomePieceOfFurniture to a Home[2], [3]
[1]http://www.sweethome3d.com/javadoc/com/eteks/sweethome3d/model/HomePieceOfFurniture.html#HomePieceOfFurniture(com.eteks.sweethome3d.model.PieceOfFurniture)
[2]http://www.sweethome3d.com/javadoc ...
by alied
Mon Apr 04, 2011 3:04 am
Forum: Developers
Topic: Add furniture progamatically !!!
Replies: 7
Views: 4753

Re: Add furniture progamatically !!!

typing from memory:
Home myHome = new Home();
HomePieceofFurniture hpf = new HomePieceofFurniture(somePieceOfFurniture);
myHome.addFurniture(hpf);

The point is, you need a instance of a class implementing PieceOfFurniture e.g. CatalogPieceOFFurniture, which you can get from a FurnitureCatalog. Then ...